Function at 0x6780d4e0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x6797fbd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
mov eax, dword [esp + 0x40]
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 0x80
push 3
push ebp
push ebp
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x18], edi
je 0x6780d77d
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x4c]
push ebp
push ecx
lea edx, [esp + 0x2c]
push 6
push edx
push edi
mov dword [esp + 0x60], ebp
call esi
test eax, eax
je 0x6780d776
cmp dword [esp + 0x4c], 6
jne 0x6780d776
cmp word [esp + 0x26], 1
jne 0x6780d776
mov eax, dword [esp + 0x28]
cmp ax, bp
je 0x6780d776
and eax, 0xffff
shl eax, 4
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x20], ebx
je 0x6780d776
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x4c]
and ecx, 0xffff
push ebp
shl ecx, 4
push eax
push ecx
push ebx
push edi
call esi
test eax, eax
je 0x6780d76c
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x4c]
and eax, 0xffff
mov edx, eax
shl edx, 4
cmp ecx, edx
jne 0x6780d76c
cmp eax, ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], ebp
jle 0x6780d740
lea esi, [ebx + 8]
cmp word [esi - 2], 0x20
jne 0x6780d6e9
mov eax, dword [esp + 0x50]
xor ecx, ecx
mov cl, byte [esi - 8]
cmp ecx, eax
je 0x6780d5fa
cmp eax, ebp
jne 0x6780d6e9
mov edx, dword [esi + 4]
push ebp
push ebp
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x6780d6e9
mov eax, dword [esi]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x6780d6e9
mov dword [esp + 0x4c], ebp
mov edx, dword [esi]
lea ecx, [esp + 0x4c]
push ebp
push ecx
push edx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
je 0x6780d6df
mov eax, dword [esp + 0x4c]
mov ecx, dword [esi]
cmp eax, ecx
jne 0x6780d6df
cmp word [ebx + 0xe], 0x20
jne 0x6780d6df
lea ecx, [esp + 0x2c]
call fcn.6797d946
push ebp
mov dword [esp + 0x48], ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CDC::Attach
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
cdq
sub eax, edx
push ebp
sar eax, 1
imul ecx, eax
mov dword [ebx + 8], eax
lea eax, [esp + 0x30]
shl ecx, 2
neg eax
mov dword [ebx + 0x14], ecx
mov edi, dword [esp + 0x34]
lea edx, [esp + 0x14]
push ebp
sbb eax, eax
push edx
and eax, edi
push ebp
push ebx
push eax
mov dword [esp + 0x28], ebp
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, dword [esp + 0x10]
cmp edi, ebp
je 0x6780d6be
cmp eax, ebp
jne 0x6780d709
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov edi, dword [esp + 0x18]
jmp 0x6780d6e9
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
inc eax
and ecx, 0xffff
add esi, 0x10
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x6780d5da
jmp 0x6780d740
mov ecx, dword [ebx + 0x14]
lea esi, [ebx + 0x28]
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x20], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret