Function at 0x4042cb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x406014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor dl, dl
push edi
mov dword [ebp - 0x40], esi
call fcn.00402c1b
mov edi, eax
xor edx, edx
push 2
mov ecx, edi
call fcn.00402caf
xor ebx, ebx
mov dword [ebp - 0x44], eax
push ebx
xor edx, edx
mov ecx, edi
call fcn.00402caf
cmp dword [0x4064e8], ebx
je 0x40436d
mov ecx, edi
mov byte [ebp - 0x38], bl
mov byte [ebp - 0x3c], bl
call fcn.00402c6d
mov esi, eax
test esi, esi
je 0x40434b
mov edx, dword [ebp - 0x44]
lea eax, [ebp - 0x14]
push eax
mov ecx, esi
call fcn.004038fa
push esi
mov bl, al
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test bl, bl
je 0x404349
mov byte [ebp - 0x38], 0x10
lea ebx, [ebp - 0x14]
mov byte [ebp - 0x3c], 1
jmp 0x40434b
xor ebx, ebx
mov ecx, dword [ebp - 0x40]
call fcn.00402b72
push ebx
push dword [ebp - 0x3c]
mov esi, eax
push dword [ebp - 0x38]
push esi
call fcn.00401b40
push esi
call dword [sym.imp.ucrtbase_clr0400.dll_free]
mov esi, dword [ebp - 0x40]
pop ecx
mov ecx, edi
call fcn.00402c6d
mov ebx, eax
mov dword [ebp - 0x54], ebx
test ebx, ebx
je 0x404585
cmp dword [ebp - 0x44], 0
jle 0x40456d
push 0x18
pop ebx
push edi
push 4
lea eax, [ebp - 0x48]
push 1
push eax
call dword [sym.imp.ucrtbase_clr0400.dll_fread]
add esp, 0x10
cmp eax, 4
jne 0x404590
push edi
push eax
lea eax, [ebp - 0x40]
push 1
push eax
call dword [sym.imp.ucrtbase_clr0400.dll_fread]
add esp, 0x10
cmp eax, 4
jne 0x404590
mov edx, dword [ebp - 0x40]
cmp edx, 8
jb 0x404585
cmp dword [ebp - 0x48], 0
jne 0x4043e6
push 1
add edx, 0xfffffff8
mov ecx, edi
call fcn.00402caf
jmp 0x404561
mov ecx, ebx
call fcn.00402ad6
mov ecx, dword [ebp - 0x40]
mov ebx, eax
mov dword [ebp - 0x38], ebx
mov dword [ebx + 4], ecx
mov ecx, dword [ebp - 0x48]
mov dword [ebx], ecx
mov ecx, edi
call fcn.00403e8e
mov ecx, edi
mov dword [ebp - 0x4c], eax
call fcn.00403e8e
mov ecx, edi
mov dword [ebp - 0x50], eax
call fcn.00402ce4
jmp 0x404426
xor edx, edx
mov ecx, edi
push 1
inc edx
call fcn.00402caf
test al, 3
jne 0x40441a
push edi
push 0x10
lea eax, [ebx + 8]
push 1
push eax
call dword [sym.imp.ucrtbase_clr0400.dll_fread]
add esp, 0x10
cmp eax, 0x10
jne 0x404590
push dword [ebx]
mov edx, dword [ebp - 0x54]
mov ecx, edi
call fcn.004039ad
mov dword [ebp - 0x58], eax
test eax, eax
je 0x404585
mov edx, dword [ebx]
mov ecx, edi
push 1
call fcn.00402caf
mov dword [ebp - 0x3c], eax
test al, 3
je 0x404487
xor edx, edx
mov ecx, edi
push 1
inc edx
call fcn.00402caf
mov ebx, eax
mov dword [ebp - 0x3c], ebx
test bl, 3
jne 0x40446e
mov ebx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x4c]
mov al, byte [ecx]
test al, al
jne 0x40449b
cmp word [ecx + 4], 0x11
je 0x40455b
cmp byte [0x4064c5], 0
je 0x40452d
test al, al
je 0x4044b1
lea ebx, [ecx + 0xe]
jmp 0x4044dd
movzx ecx, word [ecx + 4]
push 0x18
pop eax
cmp cx, ax
ja 0x4044c8
mov ebx, dword [ecx*4 + 0x401440]
test ebx, ebx
jne 0x4044dd
push 0xa
push 0xc
lea eax, [ebp - 0x1c]
push eax
push ecx
call dword [sym.imp.ucrtbase_clr0400.dll__ultow_s]
add esp, 0x10
lea ebx, [ebp - 0x1c]
mov eax, dword [ebp - 0x50]
cmp byte [eax], 0
je 0x4044ea
lea edx, [eax + 0xe]
jmp 0x404503
movzx eax, word [eax + 4]
lea ecx, [ebp - 0x34]
push 0xa
push 0xc
push ecx
push eax
call dword [sym.imp.ucrtbase_clr0400.dll__ultow_s]
add esp, 0x10
lea edx, [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
push dword [ecx]
movzx eax, word [ecx + 0xc]
push eax
movzx eax, word [ecx + 0xe]
mov ecx, 0x1389
push eax
push edx
push ebx
call fcn.00404d81
push eax
call fcn.00402f26
mov ebx, dword [ebp - 0x38]
add esp, 0x18
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x50]
push ebx
call fcn.0040400c
mov ecx, dword [ebp - 0x58]
mov dword [eax + 0x18], ecx
mov ecx, dword [0x4064f4]
test ecx, ecx
jne 0x40454d
mov dword [0x406510], eax
jmp 0x40454f
mov dword [ecx], eax
inc word [0x40650c]
mov dword [0x4064f4], eax
mov eax, dword [ebp - 0x3c]
push 0x18
pop ebx
cmp eax, dword [ebp - 0x44]
jl 0x40438e
mov ebx, dword [ebp - 0x54]
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004050da
mov esp, ebp
pop ebp
ret
push esi
push 0x453
call fcn.00402dae
call fcn.00402bd4
push 0x44f
call fcn.00402dae
int3