Function at 0x40ba50
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427524
mov eax, dword fs:[0]
push eax
sub esp, 0x374
mov eax, dword [0x431464]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x358], ecx
xor eax, eax
mov word [ebp - 0x314], ax
push 0x206
push 0
lea ecx, [ebp - 0x312]
push ecx
call fcn.00418d30
add esp, 0xc
push 0x104
lea edx, [ebp - 0x314]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xfc], eax
cmp dword [ebp - 0xfc], 0xffffffff
jne 0x40bae7
jmp 0x40bf5e
push 0
mov ecx, dword [ebp - 0xfc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x334], eax
cmp dword [ebp - 0x334], 0xffffffff
jne 0x40bb0a
jmp 0x40bf5e
mov edx, dword [ebp - 0x334]
push edx
call fcn.004168c5
add esp, 4
mov dword [ebp - 0x338], eax
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 0xbc], 0
jne 0x40bb39
jmp 0x40bf5e
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xf8], 0
xor ecx, ecx
mov dword [ebp - 0xf4], ecx
mov dword [ebp - 0xf0], ecx
mov dword [ebp - 0xec], ecx
mov dword [ebp - 0xe8], ecx
lea edx, [ebp - 0xf8]
push edx
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x334]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
mov eax, dword [ebp - 0xfc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bb99
jmp 0x40bf5e
mov dword [ebp - 0x104], 0
mov dword [ebp - 0xe4], 0
mov ecx, dword [ebp - 0x334]
mov edx, dword [ebp - 0xbc]
lea eax, [edx + ecx - 1]
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
mov dl, byte [ecx]
mov byte [ebp - 0x105], dl
movsx eax, byte [ebp - 0x105]
test eax, eax
jne 0x40bbfb
mov ecx, dword [ebp - 0xdc]
sub ecx, 1
mov dword [ebp - 0xdc], ecx
mov edx, dword [ebp - 0xdc]
mov al, byte [edx]
mov byte [ebp - 0x105], al
jmp 0x40bbd1
mov ecx, dword [ebp - 0xdc]
sub ecx, 1
mov dword [ebp - 0xe4], ecx
mov edx, dword [ebp - 0xdc]
cmp edx, dword [ebp - 0xbc]
jbe 0x40bc6e
mov eax, dword [ebp - 0xdc]
movsx ecx, byte [eax]
movsx edx, byte [ebp - 0x105]
sub ecx, edx
mov eax, dword [ebp - 0xdc]
mov byte [eax], cl
push 2
push 0x429628
mov ecx, dword [ebp - 0xdc]
push ecx
call fcn.0041a259
add esp, 0xc
test eax, eax
jne 0x40bc5d
mov edx, dword [ebp - 0xdc]
add edx, 2
mov dword [ebp - 0x104], edx
jmp 0x40bc6e
mov eax, dword [ebp - 0xdc]
sub eax, 1
mov dword [ebp - 0xdc], eax
jmp 0x40bc0a
cmp dword [ebp - 0x104], 0
je 0x40bc80
cmp dword [ebp - 0xe4], 0
jne 0x40bc85
jmp 0x40bf5e
mov ecx, dword [ebp - 0xe4]
sub ecx, dword [ebp - 0x104]
cmp ecx, 0x2710
jle 0x40bc9e
jmp 0x40bf5e
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0xdc], edx
mov dword [ebp - 0xe0], 0
lea ecx, [ebp - 0x330]
call fcn.00401a40
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xd8]
call fcn.00401a40
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xdc]
cmp eax, dword [ebp - 0xe4]
jae 0x40bf22
push 0x42962c
mov ecx, dword [ebp - 0xdc]
push ecx
call fcn.0040ca80
add esp, 8
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0
je 0x40bd18
mov edx, dword [ebp - 0xe0]
cmp edx, dword [ebp - 0xe4]
jb 0x40bd1d
jmp 0x40bf22
mov eax, dword [ebp - 0xe0]
sub eax, dword [ebp - 0xdc]
push eax
mov ecx, dword [ebp - 0xdc]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040cb20
mov dword [ebp - 0x35c], eax
mov edx, dword [ebp - 0x35c]
mov dword [ebp - 0x360], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x360]
push eax
lea ecx, [ebp - 0x330]
call fcn.00406240
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2c]
call fcn.00401b40
mov ecx, dword [ebp - 0xe0]
add ecx, 1
mov dword [ebp - 0xdc], ecx
push 0x429630
mov edx, dword [ebp - 0xe0]
push edx
call fcn.0040ca80
add esp, 8
mov dword [ebp - 0xe0], eax
cmp dword [ebp - 0xe0], 0
je 0x40bdad
mov eax, dword [ebp - 0xe0]
cmp eax, dword [ebp - 0xe4]
jb 0x40bdb9
mov ecx, dword [ebp - 0xe4]
mov dword [ebp - 0xe0], ecx
mov edx, dword [ebp - 0xe0]
sub edx, dword [ebp - 0xdc]
push edx
mov eax, dword [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x48]
call fcn.0040cb20
mov dword [ebp - 0x364], eax
mov ecx, dword [ebp - 0x364]
mov dword [ebp - 0x368], ecx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x368]
push edx
lea ecx, [ebp - 0xd8]
call fcn.00406240
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
call fcn.00401b40
mov eax, dword [ebp - 0xe0]
add eax, 1
mov dword [ebp - 0xdc], eax
lea ecx, [ebp - 0x33c]
push ecx
lea ecx, [ebp - 0xd8]
call fcn.0040cba0
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x340]
push eax
lea ecx, [ebp - 0xd8]
call fcn.00407a80
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0x9c]
call fcn.0040d580
mov dword [ebp - 0x36c], eax
mov edx, dword [ebp - 0x36c]
mov dword [ebp - 0x370], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x370]
push eax
lea ecx, [ebp - 0x344]
push ecx
lea ecx, [ebp - 0x330]
call fcn.0040cba0
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x348]
push eax
lea ecx, [ebp - 0x330]
call fcn.00407a80
mov ecx, dword [eax]
push ecx
lea ecx, [ebp - 0xb8]
call fcn.0040d580
mov dword [ebp - 0x374], eax
mov edx, dword [ebp - 0x374]
mov dword [ebp - 0x378], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x378]
push eax
lea ecx, [ebp - 0x80]
call fcn.0040cec0
mov dword [ebp - 0x37c], eax
mov ecx, dword [ebp - 0x37c]
mov dword [ebp - 0x380], ecx
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x380]
push edx
lea eax, [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x358]
call fcn.0040d620
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x80]
call fcn.0040caa0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0xb8]
call fcn.00401d20
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x9c]
call fcn.00401d20
jmp 0x40bcd5
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0x354], ecx
mov edx, dword [ebp - 0x354]
push edx
call fcn.0041a214
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xd8]
call fcn.00401b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x330]
call fcn.00401b40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416d51
mov esp, ebp
pop ebp
ret