Function at 0x4011b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x40d004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov esi, ecx
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
push 0
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x218], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x228], edi
cmp edi, 0xffffffff
je 0x40122f
push 2
push 0
push 0xfffffffffffffff8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x401241
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea eax, [ebp - 0x210]
push eax
push 4
push esi
push edi
mov dword [ebp - 0x210], 0
call ebx
test eax, eax
je 0x4014b0
cmp dword [ebp - 0x210], 4
jne 0x4014b0
mov eax, dword [esi]
test eax, eax
je 0x4014b0
cmp eax, 0x40
ja 0x4014b0
push 0
lea ecx, [ebp - 0x210]
push ecx
push 4
lea edx, [ebp - 0x214]
push edx
push edi
call ebx
test eax, eax
je 0x4014b0
cmp dword [ebp - 0x210], 4
jne 0x4014b0
cmp dword [ebp - 0x214], 0x4a534453
jne 0x4014b0
mov eax, dword [esi]
mov ecx, eax
shl ecx, 4
add ecx, eax
push 2
add ecx, ecx
add ecx, ecx
push 0
mov edx, 0xfffffff4
sub edx, ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4014b0
push 0
lea eax, [ebp - 0x210]
push eax
push 4
lea ecx, [ebp - 0x214]
push ecx
push edi
call ebx
test eax, eax
je 0x4014b0
cmp dword [ebp - 0x210], 4
jne 0x4014b0
mov ecx, dword [ebp - 0x214]
mov eax, dword [esi]
xor ecx, eax
mov dword [ebp - 0x214], ecx
cmp ecx, 0x4a534453
jne 0x4014b0
mov edx, eax
shl edx, 4
add edx, eax
add edx, edx
add edx, edx
push edx
call fcn.00402d87
mov ebx, eax
mov eax, dword [ebp - 0x218]
mov dword [eax], ebx
mov eax, dword [esi]
mov ecx, eax
shl ecx, 4
add ecx, eax
add ecx, ecx
add ecx, ecx
push ecx
push 0
push ebx
mov dword [ebp - 0x224], ebx
call fcn.004064c0
mov eax, dword [esi]
add esp, 0x10
mov ecx, eax
shl ecx, 4
push 0
add ecx, eax
lea edx, [ebp - 0x210]
push edx
add ecx, ecx
add ecx, ecx
push ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4014a7
mov esi, dword [esi]
mov edx, esi
shl edx, 4
add edx, esi
add edx, edx
add edx, edx
cmp edx, dword [ebp - 0x210]
jne 0x4014a7
xor eax, eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], eax
cmp esi, eax
jbe 0x401439
lea esi, [ebx + 4]
mov eax, dword [esi - 4]
add dword [ebp - 0x21c], eax
cmp word [esi + 0x3e], 0
jne 0x4014a7
mov eax, esi
xor ebx, ebx
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4013e0
sub eax, edx
sar eax, 1
je 0x401419
mov ecx, esi
xor word [ecx], 9
mov eax, esi
inc ebx
add ecx, 2
lea edi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x401400
sub eax, edi
sar eax, 1
cmp ebx, eax
jb 0x4013f3
mov edi, dword [ebp - 0x228]
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x220]
mov ebx, dword [ebp - 0x224]
inc eax
add esi, 0x44
mov dword [ebp - 0x218], eax
cmp eax, dword [ecx]
jb 0x4013c1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x20c]
push edx
lea esi, [ebp - 0x220]
call fcn.00401140
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x220]
lea edx, [ecx + 0x1000]
add esp, 4
cmp eax, edx
jbe 0x40148b
add ecx, 0x40000
cmp eax, ecx
jae 0x40148b
pop ebx
pop edi
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push ebx
call fcn.00402d4d
add esp, 4
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push ebx
call fcn.00402d4d
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00402b02
mov esp, ebp
pop ebp
ret