Function at 0x411ff0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov edi, dword [esp + 0x78]
push ebp
push ebp
push ebp
push 1
push edi
xor ebx, ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], 1
call fcn.00403160
add esp, 0x14
test eax, eax
je 0x412109
push ebp
push ebp
push 3
push ebp
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x412045
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
lea eax, [esp + 0x74]
push ebp
push eax
lea ecx, [esp + 0x80]
push 4
push ecx
push esi
mov dword [esp + 0x8c], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x74], 4
jne 0x41219e
cmp dword [esp + 0x78], 0x77734c4b
jne 0x41219e
mov edx, dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [sym.imp.MSVCRT.dll_malloc]
push edx
push eax
call fcn.00417cc0
add esp, 8
test eax, eax
jne 0x4120a4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
push ebp
push ebp
push 0x1080001
push ebp
push ebp
call fcn.00418290
mov esi, dword [esp + 0x98]
add esp, 0x14
cmp eax, ebp
mov dword [esi], eax
jne 0x4120cc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
push ebp
push edi
push 0x28100008
push ebp
push eax
call fcn.00418290
mov ecx, dword [esi]
push ebp
push ebp
push 0x1080001
push ebp
push ecx
call fcn.00418290
push ebp
push str.Corrupted
push 0x28100007
push ebp
push eax
call fcn.00418290
add esp, 0x3c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov edx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [sym.imp.MSVCRT.dll_free]
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x42a160], edx
mov edx, dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x42a168], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push edi
mov dword [0x42a15c], ecx
mov dword [0x42a16c], edx
mov dword [0x42a164], eax
call fcn.00418e70
add esp, 8
test eax, eax
jne 0x412163
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
push esi
push edi
call fcn.00417cc0
add esp, 8
test eax, eax
jne 0x412179
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
mov esi, dword [esp + 0x84]
mov ecx, dword [esp + 0x78]
push esi
push ecx
call fcn.00418dd0
add esp, 8
test eax, eax
jne 0x41219a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
cmp dword [esi], ebp
jne 0x4121a8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
push ebp
lea edx, [esp + 0x40]
push 0x1080001
push edx
call fcn.00417ca0
push eax
mov eax, dword [esi]
push eax
call fcn.00418200
add esp, 0x14
test eax, eax
je 0x41221b
mov edi, dword [esp + 0x74]
mov ebx, 1
cmp edi, ebp
je 0x412233
mov ecx, dword [esi]
push ebp
push ecx
call fcn.004181d0
add esp, 8
cmp eax, 0x1080001
jne 0x41221b
lea edx, [esp + 0x10]
push 4
and edi, 0xffff
push edx
push ebp
add edi, 0x9080000
push ebp
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.00417ca0
mov ecx, dword [esi]
add esp, 0xc
push eax
push ecx
call fcn.004175e0
add esp, 0x14
test eax, eax
jne 0x412233
mov edx, dword [esi]
push ebp
push edx
call fcn.00417580
add esp, 8
mov dword [esi], ebp
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
xor eax, eax
lea ecx, [esp + 0x2c]
push 8
mov dword [esp + 0x30], eax
push ecx
push ebp
mov dword [esp + 0x3c], eax
push ebp
push 0xb010004
lea edx, [esp + 0x50]
mov dword [esp + 0x48], eax
push 0x1080001
push edx
mov dword [esp + 0x54], eax
call fcn.00417ca0
add esp, 0x10
push eax
mov eax, dword [esi]
push eax
call fcn.004175e0
add esp, 0x14
test eax, eax
je 0x4123e8
lea ecx, [esp + 0x20]
push 0xc
push ecx
push ebp
push ebp
push 0x4901000a
lea edx, [esp + 0x50]
push 0x1080001
push edx
call fcn.00417ca0
add esp, 0x10
push eax
mov eax, dword [esi]
push eax
call fcn.004175e0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
add esp, 0x14
push ecx
push edx
push eax
lea ecx, [esp + 0x5c]
push str._04X__06X__08X
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
lea edx, [esp + 0x50]
lea eax, [esp + 0x3c]
push ebp
push edx
push 0x28100007
push ebp
push 0x1080001
push eax
call fcn.00417ca0
mov ecx, dword [esi]
add esp, 0xc
push eax
push ecx
call fcn.00418290
add esp, 0x14
lea edx, [esp + 0x3c]
push ebp
push 0x1010005
push 0x1080001
push edx
call fcn.00417ca0
push eax
mov eax, dword [esi]
push eax
call fcn.00418200
add esp, 0x18
lea ecx, [esp + 0x14]
mov edi, eax
lea edx, [esp + 0x3c]
push 4
push ecx
push ebp
push ebp
neg edi
push 0x901000e
push 0x1080001
sbb edi, edi
push edx
neg edi
mov dword [esp + 0x30], ebp
call fcn.00417ca0
add esp, 0x10
push eax
mov eax, dword [esi]
push eax
call fcn.004175e0
add esp, 0x14
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], ebp
push 4
push ecx
push ebp
push ebp
push 0x9010003
lea edx, [esp + 0x50]
push 0x1080001
push edx
call fcn.00417ca0
add esp, 0x10
push eax
mov eax, dword [esi]
push eax
call fcn.004175e0
mov ecx, edi
lea edx, [esp + 0x28]
neg ecx
sbb ecx, ecx
lea eax, [esp + 0x40]
and ecx, edx
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x30]
push eax
push ecx
push edx
call fcn.0040f410
mov ebx, eax
add esp, 0x24
cmp ebx, ebp
jne 0x4123ba
cmp edi, ebp
jne 0x4123b6
lea eax, [esp + 0x2c]
push eax
call fcn.0040f360
add esp, 4
test eax, eax
jne 0x4123ba
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0x2c]
push 8
push ecx
push ebp
push ebp
push 0xb010004
lea edx, [esp + 0x50]
push 0x1080001
push edx
call fcn.00417ca0
add esp, 0x10
push eax
mov eax, dword [esi]
push eax
call fcn.00417d00
add esp, 0x14
jmp 0x4123ec
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x78]
mov edx, dword [esi]
push ebp
push ecx
push 0x28100008
push ebp
push edx
call fcn.00418290
mov ecx, dword [esp + 0x90]
add esp, 0x14
cmp ecx, ebp
je 0x41241c
mov eax, dword [ecx]
mov edx, dword [esp + 0x10]
cmp eax, edx
ja 0x41241a
mov eax, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x80]
cmp eax, ebp
je 0x412429
or dword [eax], ebx
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret