Function at 0x404246
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x409104]
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 0x404410
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x6d
jne 0x4042ad
mov eax, dword [section..data]
cmp eax, section..data
je 0x4044ae
test byte [eax + 0x1c], 2
je 0x4044ae
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x1f
jmp 0x404354
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0xea
je 0x4042f8
mov eax, dword [section..data]
cmp eax, section..data
je 0x4044ae
test byte [eax + 0x1c], 1
je 0x4044ae
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
mov eax, dword [section..data]
mov edx, 0x401688
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x20
pop ecx
call fcn.00402cac
jmp 0x4044ae
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 0x404331
test byte [ecx + 0x1c], bl
je 0x404331
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.00403943
mov ecx, dword [section..data]
mov eax, dword [esi + 0x20]
mov edx, dword [eax]
cmp dword [esi + 0x24], edx
jb 0x404364
cmp ecx, edi
je 0x4044ae
test byte [ecx + 0x1c], bl
je 0x4044ae
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x22
mov edx, 0x401688
pop ecx
call fcn.004030ef
jmp 0x4044ae
push edx
push eax
call dword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_realloc]
mov edx, eax
pop ecx
pop ecx
test edx, edx
jne 0x4043a0
mov ecx, dword [section..data]
cmp ecx, edi
je 0x4044ae
test byte [ecx + 0x1c], bl
je 0x4044ae
mov eax, dword [esi + 0x20]
push dword [eax]
push dword [esi + 0x24]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x23
jmp 0x4044a8
push dword [ebp - 0x30]
mov eax, dword [esi + 0x28]
mov dword [esi + 0x20], edx
mov ecx, dword [edx]
push 0
mov dword [esi + 0x24], ecx
sub ecx, eax
push ecx
add eax, edx
push eax
push dword [esi + 8]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x404655
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 0x3e5
je 0x404655
mov eax, dword [section..data]
cmp eax, edi
je 0x4044ae
test byte [eax + 0x1c], bl
je 0x4044ae
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.00403971
jmp 0x4044ae
mov edx, dword [esi + 0x28]
add edx, dword [ebp - 0x38]
mov dword [esi + 0x28], edx
cmp edx, 0x14
jae 0x40444a
mov eax, dword [section..data]
cmp eax, section..data
je 0x4044ae
test byte [eax + 0x1c], 1
je 0x4044ae
push edx
push dword [eax + 0x14]
mov edx, 0x401688
push dword [eax + 0x10]
push 0x25
pop ecx
call fcn.00402cac
jmp 0x4044ae
mov ecx, dword [section..data]
mov edi, section..data
mov eax, edx
mov dword [ebp - 0x30], eax
cmp ecx, edi
je 0x40448b
test byte [ecx + 0x1c], 2
mov dword [ebp - 0x30], eax
je 0x40448b
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.004039a6
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 0x4044b5
cmp ecx, edi
je 0x4044ae
test byte [ecx + 0x1c], 1
je 0x4044ae
push ebx
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x27
pop ecx
call fcn.00403943
xor al, al
jmp 0x404657
mov ebx, dword [edx + 4]
mov dword [ebp - 0x34], ebx
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x34], 0
jne 0x404526
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 0x404518
sub dword [ebp - 0x30], ebx
je 0x40450a
cmp ecx, edi
je 0x404653
test byte [ecx + 0x1c], bl
je 0x404653
push dword [ebp - 0x34]
mov edx, 0x401688
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x28
pop ecx
call fcn.00402cac
jmp 0x404653
push edx
push ecx
mov ecx, esi
call fcn.00403de3
jmp 0x404644
push edx
push eax
mov ecx, esi
call fcn.00403ae3
jmp 0x404644
mov eax, dword [esi + 0x30]
sub eax, dword [esi + 0x2c]
sar eax, 2
cmp dword [ebp - 0x34], eax
jbe 0x40454a
cmp ecx, edi
je 0x404582
test byte [ecx + 0x1c], bl
je 0x404582
push dword [ebp - 0x34]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x29
jmp 0x404574
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 0x4045b8
cmp ecx, edi
je 0x404582
test byte [ecx + 0x1c], bl
je 0x404582
push dword [ebp - 0x34]
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x2a
mov edx, 0x401688
pop ecx
call fcn.00402cac
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.0040477d
jmp 0x404644
mov eax, dword [edx + 8]
mov dword [ebp - 0x3c], eax
sub eax, 0x64
je 0x404631
sub eax, 1
je 0x40461c
sub eax, 1
je 0x404607
sub eax, 1
je 0x4045f4
cmp ecx, edi
je 0x404653
test byte [ecx + 0x1c], 1
je 0x404653
push dword [ebp - 0x3c]
mov edx, 0x401688
push dword [ecx + 0x14]
push dword [ecx + 0x10]
push 0x2b
pop ecx
call fcn.00402cac
jmp 0x404653
mov eax, dword [ebp - 0x34]
push edx
push ecx
mov ecx, dword [esi + 0x2c]
mov ecx, dword [ecx + eax*4 - 4]
call fcn.00406342
jmp 0x404644
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.00406762
jmp 0x404644
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.00405a40
jmp 0x404644
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.004065a6
test eax, eax
js 0x404653
mov ecx, esi
call fcn.004041e2
test al, al
jne 0x404655
xor bl, bl
mov al, bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407250
leave
ret