Function at 0x403e20
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x34
mov eax, dword [esp + 0x3c]
push ebx
push ebp
push esi
push edi
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4041df
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x4c]
push 0
push ecx
lea edx, [esp + 0x3c]
push 0xe
push edx
push esi
call ebx
cmp word [esp + 0x34], 0x4d42
jne case.0x403ee3.11
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 0x428
push 0x40
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
lea eax, [esp + 0x4c]
push 0
push eax
push 0x28
push edi
push esi
call ebx
xor eax, eax
xor ecx, ecx
mov ax, word [edi + 0xe]
mov cx, word [edi + 0xc]
imul eax, ecx
mov edx, dword [edi + 8]
mov ebp, dword [edi + 4]
mov dword [esp + 0x20], eax
add eax, 0xfffffff8
cmp eax, 0x10
mov dword [esp + 0x14], edx
ja case.0x403ee3.11
xor ecx, ecx
mov cl, byte [eax + 0x4041fc]
jmp dword [ecx*4 + 0x4041ec]
lea edx, [esp + 0x4c]
push 0
push edx
add edi, 0x28
push 0x400
push edi
push esi
call ebx
lea ebx, [ebp + 3]
jmp 0x403f1e
lea ebx, [ebp + ebp + 3]
mov word [edi + 0xc], 1
and ebx, 0xfffc
mov word [edi + 0xe], 0x18
jmp 0x403f24
lea ebx, [ebp + ebp*2 + 3]
and ebx, 0xfffc
mov eax, dword [0x431220]
lea edi, [ebp + ebp*2 + 3]
and edi, 0xfffc
mov dword [esp + 0x24], edi
imul edi, dword [esp + 0x14]
test eax, eax
je 0x403f51
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x431220], 0
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x40
call edi
push eax
mov dword [0x431220], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push 0x960
push 0x40
mov dword [esp + 0x18], eax
call edi
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x40402b
xor ecx, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x20]
cmp eax, 0x18
jne 0x403fc9
mov eax, dword [esp + 0x3e]
push 0
add ecx, eax
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x4c]
push 0
push ecx
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x404004
cmp eax, 0xf
je 0x403fd3
cmp eax, 0x10
jne 0x404004
mov eax, dword [esp + 0x3e]
push 0
add ecx, eax
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x4c]
push 0
push ecx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x10]
push ebp
push edx
push edi
call fcn.00403930
add esp, 0xc
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x18]
add ecx, ebx
dec eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jne 0x403f98
mov edi, dword [esp + 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x435568]
mov edx, dword [0x435560]
sub eax, edx
mov edi, dword [esp + 0x14]
inc eax
mov dword [0x435904], ebp
cdq
idiv ebp
mov dword [0x435908], edi
mov ecx, eax
cmp ecx, 3
jle 0x40406a
mov ecx, 3
mov eax, dword [0x43556c]
mov ebp, dword [0x435564]
sub eax, ebp
inc eax
cdq
idiv edi
cmp eax, 3
jle 0x404085
mov eax, 3
cmp ecx, eax
mov dword [0x4228e8], ecx
jg 0x404094
mov dword [0x4228e8], eax
mov ebp, dword [esp + 0x48]
push ebp
call fcn.0040ddd0
mov ecx, dword [0x435724]
mov eax, dword [0x43556c]
imul ecx, dword [0x43554c]
mov ebx, dword [0x435564]
mov edi, dword [0x435720]
sub eax, ebx
shl edi, 0xa
inc eax
imul eax, ecx
cdq
idiv edi
mov edx, dword [0x435560]
push eax
mov eax, dword [0x435568]
sub eax, edx
inc eax
imul eax, ecx
cdq
idiv edi
push eax
push ebp
call fcn.00403b10
mov ecx, dword [0x435514]
mov edi, dword [0x435904]
mov edx, ecx
mov eax, 0x51eb851f
imul edx, edi
imul edx
sar edx, 5
mov ebx, dword [0x435560]
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [0x435568]
sub eax, edx
add esp, 0x10
sub eax, ebx
mov ebx, dword [0x435908]
inc eax
imul ecx, ebx
cdq
sub eax, edx
sar eax, 1
mov dword [0x435530], eax
mov eax, 0x51eb851f
imul ecx
mov eax, dword [0x43556c]
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [0x435564]
sub eax, edx
sub eax, ecx
inc eax
cdq
sub eax, edx
sar eax, 1
mov dword [0x435534], eax
mov al, byte [0x43084d]
test al, al
je 0x404171
mov edx, dword [0x431220]
push ebx
push edi
push edx
call fcn.0040e140
add esp, 0xc
mov eax, dword [0x431220]
push 0x43553c
push eax
call fcn.0040e210
mov ecx, dword [0x43553c]
push ecx
call fcn.0040e380
push ebp
call fcn.00404210
mov edi, eax
push edi
push ebp
call fcn.0040e910
mov ebx, dword [esp + 0x44]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
add esp, 0x18
push ebx
call ebp
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [0x431220]
push edx
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x34
ret