Function at 0x407c40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x648
mov eax, dword [0x4ae008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push dword [0x4b3888]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x630], ebx
cmp ebx, 0xffffffff
jne 0x407c91
lea eax, [ebx + 0x65]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046d3f6
mov esp, ebp
pop ebp
ret
push esi
mov ecx, ebx
call fcn.00407b30
test eax, eax
jne 0x407ca5
lea esi, [eax + 0x65]
jmp 0x4080f8
push edi
push 0
push 0
push dword [0x4b3884]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x624]
push eax
push 0x20
push 0x4b21ac
push ebx
call edi
test eax, eax
je 0x4080e4
mov eax, dword [ebp - 0x624]
cmp eax, 0xffffffff
je 0x4080dd
cmp eax, 0x20
jne 0x4080d6
mov ecx, dword [0x4b21b8]
xor esi, esi
test ecx, ecx
je 0x407d0b
mov eax, dword [0x4b3884]
add eax, 0xffffffe0
add eax, ecx
mov dword [0x4b21b8], eax
mov eax, dword [0x4b21c8]
imul eax, eax, 0x104
add eax, 2
push 2
push eax
call fcn.0046dc54
add esp, 8
mov dword [ebp - 0x638], eax
mov dword [0x4b3880], eax
test eax, eax
jne 0x407d3b
lea esi, [eax + 0x66]
jmp 0x4080f7
xor ecx, ecx
mov dword [eax], ecx
mov dword [ebp - 0x624], ecx
cmp dword [0x4b21c8], ecx
jle 0x4080f7
push 0
lea eax, [ebp - 0x640]
push eax
push 2
lea eax, [ebp - 0x620]
push eax
push ebx
mov esi, 0x104
call edi
test eax, eax
je 0x4080e4
mov eax, dword [ebp - 0x640]
cmp eax, 0xffffffff
je 0x4080dd
cmp eax, 2
jne 0x4080d6
mov ax, word [ebp - 0x620]
test ax, ax
je 0x4080cf
cmp ax, si
jae 0x4080cf
movzx esi, ax
push 0
lea eax, [ebp - 0x63c]
push eax
add esi, esi
push esi
lea eax, [ebp - 0x20c]
push eax
push ebx
call edi
test eax, eax
je 0x4080e4
mov eax, dword [ebp - 0x63c]
cmp eax, 0xffffffff
je 0x4080dd
cmp eax, esi
jne 0x4080d6
movzx eax, word [ebp - 0x620]
add eax, eax
cmp eax, 0x208
jae 0x408111
xor ecx, ecx
mov word [ebp + eax - 0x20c], cx
mov ecx, dword [0x4b387c]
lea edx, [ebp - 0x61c]
sub edx, ecx
jmp 0x407e10
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x407e10
lea edx, [ebp - 0x20c]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x407e27
lea edi, [ebp - 0x61c]
sub edx, esi
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407e40
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x638]
lea ecx, [ebp - 0x61c]
mov edx, esi
mov eax, ecx
sub edx, eax
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x407e70
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407e84
sub ecx, edx
sar ecx, 1
xor eax, eax
lea esi, [esi + ecx*2]
add esi, 2
push 4
lea edx, [ebp - 0x644]
mov ecx, ebx
mov dword [ebp - 0x638], esi
mov word [esi], ax
call fcn.00407950
mov esi, eax
add esp, 4
test esi, esi
jne 0x4080f7
lea ecx, [ebp - 0x61c]
call fcn.00407770
test eax, eax
jne 0x4080c8
push eax
push 0x80
push 2
push eax
push eax
push 0xc0000000
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x628], edi
cmp edi, 0xffffffff
je 0x4080c1
lea eax, [ebp - 0x20c]
push 0x491d24
push eax
call fcn.0046f7d4
add esp, 8
mov ecx, ebx
push 4
test eax, eax
jne 0x407fd7
lea edx, [ebp - 0x648]
call fcn.00407950
mov esi, eax
add esp, 4
test esi, esi
jne 0x407fcb
push 0x8000
call fcn.0046d405
add esp, 4
mov dword [ebp - 0x62c], eax
test eax, eax
je 0x408026
mov ebx, dword [ebp - 0x648]
test ebx, ebx
je 0x407fb8
lea ecx, [ecx]
mov ecx, dword [ebp - 0x630]
mov edi, 0x8000
cmp ebx, edi
cmovl edi, ebx
push edi
mov edx, eax
sub ebx, edi
call fcn.00407950
mov esi, eax
add esp, 4
test esi, esi
jne 0x407fac
mov edx, dword [ebp - 0x62c]
push edi
mov edi, dword [ebp - 0x628]
mov ecx, edi
call fcn.004079b0
mov esi, eax
add esp, 4
test esi, esi
jne 0x407fb2
mov eax, dword [ebp - 0x62c]
test ebx, ebx
jne 0x407f60
jmp 0x407fb2
mov edi, dword [ebp - 0x628]
mov eax, dword [ebp - 0x62c]
push eax
call fcn.0046d497
mov ebx, dword [ebp - 0x630]
add esp, 4
test esi, esi
je 0x408026
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4080f7
lea edx, [ebp - 0x634]
call fcn.00407950
mov esi, eax
add esp, 4
test esi, esi
jne 0x407fcb
push 1
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x634]
mov dword [ebp - 0x628], eax
push ebx
push edi
call dword [sym.imp.MMFS2.dll_Ordinal_766]
mov esi, eax
test esi, esi
jne 0x407fcb
push eax
push eax
mov eax, dword [ebp - 0x634]
add eax, dword [ebp - 0x628]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408030
sub ecx, edx
sar ecx, 1
cmp ecx, 4
jl 0x408096
lea eax, [ebp + ecx*2 - 0x214]
push 0x491da8
push eax
call fcn.0046f7d4
add esp, 8
test eax, eax
jne 0x408096
push eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, edi
call fcn.00407a00
push ecx
mov edx, eax
mov ecx, edi
call fcn.00407a40
add esp, 4
cmp dword [ebp - 0x644], eax
push 2
push 0
push 0
mov eax, 0x65
push edi
cmovne esi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x4080f7
mov edi, dword [ebp - 0x624]
inc edi
mov dword [ebp - 0x624], edi
cmp edi, dword [0x4b21c8]
jge 0x4080f7
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x407d51
mov esi, 0x68
jmp 0x4080f7
mov esi, 0x67
jmp 0x4080f7
mov esi, 0x65
jmp 0x4080f7
mov esi, 0x40000002
jmp 0x4080f7
mov esi, 0x40000001
jmp 0x4080f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [eax - 0x26]
neg esi
sbb esi, esi
add esi, 0x40000002
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046d3f6
mov esp, ebp
pop ebp
ret
call fcn.0046ee39
int3