Function at 0x40c540
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x468
mov eax, dword [0x42d0f0]
xor eax, esp
mov dword [esp + 0x464], eax
mov eax, dword [esp + 0x480]
mov ecx, dword [esp + 0x47c]
push ebx
mov ebx, dword [esp + 0x470]
mov edx, dword [ebx + 0x22c]
push ebp
mov ebp, dword [esp + 0x490]
push esi
mov esi, dword [esp + 0x490]
push edi
mov edi, dword [esp + 0x480]
push eax
push ecx
push ebp
push esi
push str.____Reading__I64u_bytes_from_offset__I64u
push 0
push 6
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x60], edi
call edx
add esp, 0x1c
cmp dword [esp + 0x484], 0
je 0x40c644
cmp dword [esp + 0x488], 0
je 0x40c644
test ebp, ebp
ja 0x40c5ca
cmp esi, 0x7fffffff
jb 0x40c5e7
mov eax, dword [ebx + 0x22c]
push 0x7fffffff
push ebp
push esi
push str.____Cannot_read__I64u_bytes__maximum_is__lu.
push 0
push 2
call eax
add esp, 0x18
jmp 0x40c644
mov ebp, dword [edi + 4]
mov ebx, dword [edi]
mov ecx, dword [esp + 0x498]
push ebp
push ebx
push ecx
push esi
call fcn.00412e80
test edx, edx
ja 0x40c604
test eax, eax
jbe 0x40c618
sub ebx, eax
sbb ebp, edx
add esi, ebx
adc dword [esp + 0x498], ebp
mov dword [esp + 0x494], esi
push esi
call fcn.00412a5f
mov ebp, eax
xor ebx, ebx
add esp, 4
mov dword [esp + 0x2c], ebp
cmp ebp, ebx
jne 0x40c65f
push str.Error:_malloc___returned_NULL.
push ebx
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x22c]
push 2
call eax
add esp, 0xc
xor eax, eax
mov ecx, dword [esp + 0x474]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00411002
add esp, 0x468
ret
push esi
push ebx
push ebp
call fcn.00412f00
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x490]
add esp, 0xc
xor esi, esi
cmp byte [ebx], 0
je 0x40c962
lea esp, [esp]
movzx eax, byte [esi + ebx]
mov ebp, dword [esp + 0x488]
mov ecx, eax
shr eax, 4
inc esi
and ecx, 0xf
mov edx, eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x40], esi
cmp esi, ebp
jae 0x40c969
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
test ecx, ecx
jle 0x40c6e1
mov dl, byte [esi + ebx]
inc esi
mov byte [esp + eax + 0x14], dl
mov dword [esp + 0x40], esi
cmp esi, ebp
jae 0x40c983
inc eax
cmp eax, ecx
jl 0x40c6c4
mov edx, dword [esp + 0x48]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
test edx, edx
jle 0x40c70e
mov cl, byte [esi + ebx]
inc esi
mov byte [esp + eax + 0x24], cl
mov dword [esp + 0x40], esi
cmp esi, ebp
jae 0x40c98f
inc eax
cmp eax, edx
jl 0x40c6f1
mov ecx, dword [esp + 0x24]
cmp byte [esp + eax + 0x23], 0x80
jb 0x40c738
cmp eax, 8
jge 0x40c738
mov edx, 8
sub edx, eax
push edx
lea ecx, [esp + eax + 0x28]
push 0xff
push ecx
call fcn.00412f00
mov ecx, dword [esp + 0x30]
add esp, 0xc
add dword [esp + 0x38], ecx
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
adc dword [esp + 0x3c], eax
add dword [esp + 0x30], edx
mov eax, dword [esp + 0x18]
adc dword [esp + 0x34], eax
or ecx, dword [esp + 0x28]
je 0x40c954
or edx, eax
je 0x40c954
mov ebp, dword [edi + 0xc]
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x14]
mov ebx, dword [edi + 8]
mov edx, dword [esp + 0x34]
mov esi, dword [edi]
mov edi, dword [edi + 4]
push ebp
push ebx
sbb edx, eax
push edx
push ecx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], edi
call fcn.00412be0
push edi
push esi
push edx
push eax
call fcn.00412be0
mov ecx, dword [esp + 0x4c]
mov esi, eax
mov eax, dword [esp + 0x50]
push eax
push ecx
push ebp
push ebx
mov edi, edx
call fcn.00412be0
mov ebp, edx
mov edx, dword [esp + 0x3c]
mov ebx, eax
mov eax, dword [esp + 0x38]
push edx
push eax
push ebp
push ebx
call fcn.00412be0
mov ecx, dword [esp + 0x18]
push ecx
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x18]
push edx
push ebp
push ebx
mov dword [esp + 0x2c], eax
call fcn.00412be0
mov ebp, eax
mov ebx, edx
mov ecx, ebp
add ecx, esi
mov eax, ebx
adc eax, edi
cmp dword [esp + 0x490], eax
ja 0x40c945
jb 0x40c804
cmp dword [esp + 0x48c], ecx
jae 0x40c945
mov eax, dword [esp + 0x490]
cmp eax, edi
jb 0x40c849
ja 0x40c81a
cmp dword [esp + 0x48c], esi
jbe 0x40c849
mov ecx, dword [esp + 0x48c]
sub ecx, esi
sbb eax, edi
add dword [esp + 0x1c], ecx
mov edx, esi
mov esi, dword [esp + 0x48c]
adc dword [esp + 0x20], eax
sub edx, esi
mov eax, edi
mov edi, dword [esp + 0x490]
sbb eax, edi
add ebp, edx
adc ebx, eax
mov eax, edi
mov ecx, dword [esp + 0x48c]
add ecx, dword [esp + 0x494]
adc eax, dword [esp + 0x498]
mov dword [esp + 0x54], ecx
cmp eax, edi
jb 0x40c945
ja 0x40c874
cmp ecx, esi
jbe 0x40c945
mov edx, ebp
add edx, esi
mov ecx, ebx
adc ecx, edi
cmp eax, ecx
ja 0x40c8a8
jb 0x40c888
cmp dword [esp + 0x54], edx
jae 0x40c8a8
mov ebp, dword [esp + 0x48c]
mov ebx, dword [esp + 0x490]
sub ebp, esi
sbb ebx, edi
add ebp, dword [esp + 0x494]
adc ebx, dword [esp + 0x498]
mov ecx, ebp
or ecx, ebx
je 0x40c945
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0xc]
mov edx, esi
sub edx, dword [esp + 0x48c]
sbb edi, dword [esp + 0x490]
push edi
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 4]
mov eax, dword [eax]
push edx
push ecx
push eax
call fcn.00412be0
mov edi, dword [esp + 0x24]
push edx
push eax
mov eax, dword [esp + 0x30]
push eax
push edi
call fcn.00412e10
push edx
push eax
push ebx
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx + 0x22c]
push ebp
push str.____Reading__I64u_bytes_from_Lcn_I64u_into_offset_I64u
push 0
push 6
call ecx
sub esi, dword [esp + 0x4b0]
mov edx, dword [esp + 0x44]
add esi, dword [esp + 0x50]
add esp, 0x24
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x60]
push ecx
push ebp
mov dword [esp + 0x78], edx
mov edx, dword [ebx + 0x20]
push esi
push edx
mov dword [esp + 0x7c], edi
mov dword [esp + 0x84], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40c9a9
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x484]
cmp byte [esi + ebx], 0
jne 0x40c690
mov ebp, dword [esp + 0x2c]
mov eax, ebp
jmp 0x40c646
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x22c]
push str.Error:_datarun_is_longer_than_buffer__the_MFT_may_be_corrupt.
push 0
push 2
call ecx
jmp 0x40c641
push str.Error:_datarun_is_longer_than_buffer__the_MFT_may_be_corrupt.
push 0
jmp 0x40c633
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x22c]
push str.Error:_datarun_is_longer_than_buffer__the_MFT_may_be_corrupt.
push 0
push 2
call edx
jmp 0x40c641
push 0x200
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call sym.JkDefrag.exe_SystemErrorStr
lea ecx, [esp + 0x80]
push ecx
push str.Error_while_reading_disk:__s
mov edx, ebx
mov eax, dword [edx + 0x22c]
push 0
push 2
call eax
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00412c14
add esp, 0x20
jmp 0x40c644