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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415c91
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x41f68c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x170], ecx
push 0x103
lea eax, [ebp - 0x117]
push 0
push eax
mov byte [ebp - 0x118], 0
call fcn.0040b7f0
add esp, 0xc
lea eax, [ebp - 0x118]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, 0x104
jne 0x402333
xor eax, eax
jmp 0x40258f
cmp byte [ebp - 0x118], 0
mov dword [ebp - 0x134], 0xf
mov dword [ebp - 0x138], 0
mov byte [ebp - 0x148], 0
jne 0x40235b
xor ecx, ecx
jmp 0x40236d
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402364
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x148]
call fcn.00402e80
push 0
push 0
push 3
push 0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x134], 0x10
push 0
lea eax, [ebp - 0x148]
cmovae eax, dword [ebp - 0x148]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402574
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
mov dword [ebp - 0x178], edi
call fcn.00407f16
add esp, 4
lea ecx, [ebp - 0x164]
push 0
push ecx
push edi
push eax
push esi
mov dword [ebp - 0x168], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402574
push str.data
lea ecx, [ebp - 0x160]
xor bl, bl
mov dword [ebp - 0x16c], 0
call fcn.00402c20
lea eax, [ebp - 0x160]
push eax
mov edx, 0x41b824
lea ecx, [ebp - 0x194]
mov byte [ebp - 4], 1
call fcn.00403580
push 0x41b820
mov edx, eax
lea ecx, [ebp - 0x130]
mov byte [ebp - 4], 2
call fcn.00403670
add esp, 8
cmp dword [ebp - 0x180], 0x10
jb 0x40245d
push dword [ebp - 0x194]
call fcn.004081ae
add esp, 4
mov esi, dword [ebp - 0x168]
mov eax, edi
mov edi, dword [ebp - 0x120]
sub eax, edi
mov dword [ebp - 0x17c], eax
xor eax, eax
cmp eax, dword [ebp - 0x17c]
jae 0x4024eb
push 0
lea ecx, [ebp - 0x130]
call fcn.00402d30
movsx ecx, byte [eax]
movzx eax, byte [esi]
cmp eax, ecx
jne 0x4024d7
xor edx, edx
mov bl, 1
test edi, edi
jle 0x4024d7
lea esp, [esp]
cmp dword [ebp - 0x11c], 0x10
movzx ecx, byte [esi + edx]
lea eax, [ebp - 0x130]
cmovae eax, dword [ebp - 0x130]
movzx ebx, bl
movsx eax, byte [eax + edx]
cmp ecx, eax
mov dword [ebp - 0x174], 0
cmovne ebx, dword [ebp - 0x174]
inc edx
cmp edx, edi
jl 0x4024a0
mov eax, dword [ebp - 0x16c]
inc eax
inc esi
mov dword [ebp - 0x16c], eax
test bl, bl
je 0x402475
jmp 0x4024ef
test bl, bl
je 0x40250c
mov ecx, dword [ebp - 0x178]
mov edx, dword [ebp - 0x170]
mov esi, dword [ebp - 0x168]
dec eax
add eax, edi
sub ecx, eax
mov dword [edx], ecx
add esi, eax
jmp 0x40250e
xor esi, esi
cmp dword [ebp - 0x11c], 0x10
jb 0x402525
push dword [ebp - 0x130]
call fcn.004081ae
add esp, 4
cmp dword [ebp - 0x14c], 0x10
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
jb 0x402557
push dword [ebp - 0x160]
call fcn.004081ae
add esp, 4
mov dword [ebp - 0x14c], 0xf
mov dword [ebp - 0x150], 0
mov byte [ebp - 0x160], 0
jmp 0x402576
xor esi, esi
cmp dword [ebp - 0x134], 0x10
jb 0x40258d
push dword [ebp - 0x148]
call fcn.004081ae
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040819f
mov esp, ebp
pop ebp
ret