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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4236d1
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x42f6ac]
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.00411050
add esp, 0xc
lea eax, [ebp - 0x118]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp eax, 0x104
jne 0x4024f3
xor eax, eax
jmp 0x40274f
cmp byte [ebp - 0x118], 0
mov dword [ebp - 0x134], 0xf
mov dword [ebp - 0x138], 0
mov byte [ebp - 0x148], 0
jne 0x40251b
xor ecx, ecx
jmp 0x40252d
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402524
sub ecx, edx
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x148]
call fcn.00403040
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 0x402734
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
mov dword [ebp - 0x178], edi
call fcn.0040bdf0
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 0x402734
push str.data
lea ecx, [ebp - 0x160]
xor bl, bl
mov dword [ebp - 0x16c], 0
call fcn.00402de0
lea eax, [ebp - 0x160]
push eax
mov edx, 0x42a884
lea ecx, [ebp - 0x194]
mov byte [ebp - 4], 1
call fcn.00403740
push 0x42a880
mov edx, eax
lea ecx, [ebp - 0x130]
mov byte [ebp - 4], 2
call fcn.00403830
add esp, 8
cmp dword [ebp - 0x180], 0x10
jb 0x40261d
push dword [ebp - 0x194]
call fcn.0040c7d6
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 0x4026ab
push 0
lea ecx, [ebp - 0x130]
call fcn.00402ef0
movsx ecx, byte [eax]
movzx eax, byte [esi]
cmp eax, ecx
jne 0x402697
xor edx, edx
mov bl, 1
test edi, edi
jle 0x402697
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 0x402660
mov eax, dword [ebp - 0x16c]
inc eax
inc esi
mov dword [ebp - 0x16c], eax
test bl, bl
je 0x402635
jmp 0x4026af
test bl, bl
je 0x4026cc
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 0x4026ce
xor esi, esi
cmp dword [ebp - 0x11c], 0x10
jb 0x4026e5
push dword [ebp - 0x130]
call fcn.0040c7d6
add esp, 4
cmp dword [ebp - 0x14c], 0x10
mov dword [ebp - 0x11c], 0xf
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x130], 0
jb 0x402717
push dword [ebp - 0x160]
call fcn.0040c7d6
add esp, 4
mov dword [ebp - 0x14c], 0xf
mov dword [ebp - 0x150], 0
mov byte [ebp - 0x160], 0
jmp 0x402736
xor esi, esi
cmp dword [ebp - 0x134], 0x10
jb 0x40274d
push dword [ebp - 0x148]
call fcn.0040c7d6
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.0040c7c7
mov esp, ebp
pop ebp
ret