Function at 0x404616
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x4090a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
lea ecx, [ebp - 0x38]
push 0
push ecx
lea eax, [esi + 0xc]
push eax
push dword [esi + 8]
mov dword [ebp - 0x30], eax
call dword [sym.imp.api_ms_win_core_io_l1_1_0.dll_GetOverlappedResult]
test eax, eax
jne 0x4047df
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x6d
jne 0x40467d
mov eax, dword [section..data]
cmp eax, section..data
je 0x40487d
test byte [eax + 0x1c], 2
je 0x40487d
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x1f
jmp 0x404724
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0xea
je 0x4046c8
mov eax, dword [section..data]
cmp eax, section..data
je 0x40487d
test byte [eax + 0x1c], 1
je 0x40487d
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
mov eax, dword [section..data]
mov edx, 0x4016bc
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x20
pop ecx
call fcn.00402f55
jmp 0x40487d
mov eax, dword [ebp - 0x38]
add dword [esi + 0x28], eax
mov ecx, dword [section..data]
xor ebx, ebx
mov edi, section..data
inc ebx
cmp ecx, edi
je 0x404701
test byte [ecx + 0x1c], bl
je 0x404701
mov eax, dword [esi + 0x20]
push dword [eax]
push dword [esi + 0x24]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x21
pop ecx
call fcn.00403d35
mov ecx, dword [section..data]
mov eax, dword [esi + 0x20]
mov edx, dword [eax]
cmp dword [esi + 0x24], edx
jb 0x404734
cmp ecx, edi
je 0x40487d
test byte [ecx + 0x1c], bl
je 0x40487d
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x22
mov edx, 0x4016bc
pop ecx
call fcn.0040342c
jmp 0x40487d
push edx
push eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_realloc]
pop ecx
pop ecx
mov ecx, eax
test ecx, ecx
jne 0x404770
mov ecx, dword [section..data]
cmp ecx, edi
je 0x40487d
test byte [ecx + 0x1c], bl
je 0x40487d
mov eax, dword [esi + 0x20]
push dword [eax]
push dword [esi + 0x24]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x23
jmp 0x404877
push dword [ebp - 0x30]
mov dword [esi + 0x20], ecx
mov edx, dword [ecx]
add ecx, dword [esi + 0x28]
push 0
mov dword [esi + 0x24], edx
sub edx, dword [esi + 0x28]
push edx
push ecx
push dword [esi + 8]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x404a24
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x404a24
mov eax, dword [section..data]
cmp eax, edi
je 0x40487d
test byte [eax + 0x1c], bl
je 0x40487d
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
push dword [esi + 0x24]
mov eax, dword [section..data]
push dword [esi + 0x28]
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00403d69
jmp 0x40487d
mov edx, dword [esi + 0x28]
add edx, dword [ebp - 0x38]
mov dword [esi + 0x28], edx
cmp edx, 0x14
jae 0x404819
mov eax, dword [section..data]
cmp eax, section..data
je 0x40487d
test byte [eax + 0x1c], 1
je 0x40487d
push edx
push dword [eax + 0x14]
mov edx, 0x4016bc
push dword [eax + 0x10]
push 0x25
pop ecx
call fcn.00402f55
jmp 0x40487d
mov ecx, dword [section..data]
mov edi, section..data
mov eax, edx
mov dword [ebp - 0x30], eax
cmp ecx, edi
je 0x40485a
test byte [ecx + 0x1c], 2
mov dword [ebp - 0x30], eax
je 0x40485a
mov eax, dword [esi + 0x20]
push dword [eax + 8]
push dword [eax + 4]
push dword [esi + 0x24]
push edx
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.00403da4
mov eax, dword [esi + 0x28]
mov ecx, dword [section..data]
mov dword [ebp - 0x30], eax
mov edx, dword [esi + 0x20]
mov ebx, dword [edx]
cmp eax, ebx
je 0x404884
cmp ecx, edi
je 0x40487d
test byte [ecx + 0x1c], 1
je 0x40487d
push ebx
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x27
pop ecx
call fcn.00403d35
xor al, al
jmp 0x404a26
mov ebx, dword [edx + 4]
mov dword [ebp - 0x34], ebx
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x34], 0
jne 0x4048f5
mov ecx, dword [edx + 8]
mov dword [ebp - 0x30], ecx
sub dword [ebp - 0x30], 0x68
mov dword [ebp - 0x34], ecx
mov ecx, dword [section..data]
je 0x4048e7
sub dword [ebp - 0x30], ebx
je 0x4048d9
cmp ecx, edi
je 0x404a22
test byte [ecx + 0x1c], bl
je 0x404a22
push dword [ebp - 0x34]
mov edx, 0x4016bc
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x28
pop ecx
call fcn.00402f55
jmp 0x404a22
push edx
push ecx
mov ecx, esi
call fcn.004041a3
jmp 0x404a13
push edx
push eax
mov ecx, esi
call fcn.00403ed6
jmp 0x404a13
mov eax, dword [esi + 0x30]
sub eax, dword [esi + 0x2c]
sar eax, 2
cmp dword [ebp - 0x34], eax
jbe 0x404919
cmp ecx, edi
je 0x404951
test byte [ecx + 0x1c], bl
je 0x404951
push dword [ebp - 0x34]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x29
jmp 0x404943
mov ecx, dword [esi + 0x2c]
mov eax, dword [ebp - 0x34]
mov eax, dword [ecx + eax*4 - 4]
mov ecx, dword [section..data]
cmp dword [eax + 8], 0
jne 0x404987
cmp ecx, edi
je 0x404951
test byte [ecx + 0x1c], bl
je 0x404951
push dword [ebp - 0x34]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x2a
mov edx, 0x4016bc
pop ecx
call fcn.00402f55
mov edx, dword [esi + 0x20]
mov dword [ebp - 0x2c], 0x28
lea edi, [ebp - 0x1c]
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 8]
push 6
mov dword [ebp - 0x24], eax
xor eax, eax
pop ecx
mov dword [ebp - 0x20], 0x80004005
rep stosd dword es:[edi], eax
push 0x28
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.00404b58
jmp 0x404a13
mov eax, dword [edx + 8]
mov dword [ebp - 0x3c], eax
sub eax, 0x64
je 0x404a00
sub eax, 1
je 0x4049eb
sub eax, 1
je 0x4049d6
sub eax, 1
je 0x4049c3
cmp ecx, edi
je 0x404a22
test byte [ecx + 0x1c], 1
je 0x404a22
push dword [ebp - 0x3c]
mov edx, 0x4016bc
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x2b
pop ecx
call fcn.00402f55
jmp 0x404a22
mov eax, dword [ebp - 0x34]
push edx
push ecx
mov ecx, dword [esi + 0x2c]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.004067e8
jmp 0x404a13
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0x2c]
push edx
push dword [ebp - 0x30]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.00406c14
jmp 0x404a13
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0x2c]
push edx
push dword [ebp - 0x30]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.00405efb
jmp 0x404a13
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0x2c]
push edx
push dword [ebp - 0x30]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.00406a52
test eax, eax
js 0x404a22
mov ecx, esi
call fcn.004045ac
test al, al
jne 0x404a24
xor bl, bl
mov al, bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407320
leave
ret