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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5cfa8e
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x65a000]
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 esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0xac], esi
mov dword [ebp - 0xa4], ebx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 7
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x5c], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], eax
mov word [ebp - 0x40], ax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], eax
mov byte [ebp - 4], 4
mov eax, dword [ebx]
mov ecx, ebx
push dword [eax + 4]
call fcn.00413850
mov eax, dword [ebx]
mov dword [eax + 4], eax
mov eax, dword [ebx]
mov dword [eax], eax
mov eax, dword [ebx]
mov dword [eax + 8], eax
mov dword [ebx + 4], 0
cmp dword [esi + 0x14], 8
jb 0x4125cd
mov eax, dword [esi]
jmp 0x4125cf
mov eax, esi
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x412a5c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x412a55
lea eax, [edi + 2]
push eax
mov ebx, edi
push 0
shr ebx, 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x88], eax
test eax, eax
je 0x412a55
push 0
lea ecx, [ebp - 0x44]
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
push esi
setne byte [ebp - 0x81]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x81], 0
jne 0x412671
push dword [ebp - 0x88]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor bl, bl
jmp 0x4129b3
mov esi, dword [ebp - 0x88]
mov ecx, esi
movzx eax, word [esi]
mov edx, ebx
test ax, ax
je 0x4126a5
test edx, edx
je 0x4126a5
cmp ax, 0xd
je 0x412693
cmp ax, 0xa
jne 0x412698
xor eax, eax
mov word [ecx], ax
movzx eax, word [ecx + 2]
add ecx, 2
dec edx
test ax, ax
jne 0x412683
xor eax, eax
mov word [ecx], ax
movzx eax, word [esi]
mov ecx, 0xfffe
mov edi, esi
cmp ax, cx
je 0x4126c3
mov ecx, 0xfeff
cmp ax, cx
jne 0x4126c7
lea edi, [esi + 2]
dec ebx
test ebx, ebx
je 0x412975
nop
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4126d5
sub ecx, edx
sar ecx, 1
je 0x412963
lea ebx, [ebx]
movzx ecx, word [edi]
mov eax, ecx
cmp eax, 0x20
je 0x4126ff
cmp eax, 9
jne 0x41270a
test cx, cx
je 0x41270a
add edi, 2
dec ebx
jmp 0x4126f0
movzx eax, word [edi]
cmp eax, 0x5b
jne 0x412952
push 0
push 0x60ec18
lea ecx, [ebp - 0x28]
add edi, 2
dec ebx
call fcn.004058d0
movzx eax, word [edi]
cmp eax, 0x5d
je 0x412754
test ax, ax
je 0x412754
test ebx, ebx
je 0x412754
movzx eax, ax
push eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.004119a0
movzx eax, word [edi + 2]
add edi, 2
dec ebx
cmp eax, 0x5d
jne 0x412731
add edi, 2
dec ebx
cmp dword [ebp - 0x18], 0
jbe 0x412967
push dword [ebp - 0x9c]
mov esi, dword [ebp - 0xa0]
push esi
lea eax, [ebp - 0xb8]
push eax
lea ecx, [ebp - 0xa0]
call fcn.00412fd0
test ebx, ebx
je 0x4128c3
lea esp, [esp]
movzx ecx, word [edi]
mov eax, ecx
cmp eax, 0x20
je 0x41279f
cmp eax, 9
jne 0x4127aa
test cx, cx
je 0x4127aa
add edi, 2
dec ebx
jmp 0x412790
test ebx, ebx
je 0x4128c3
movzx ecx, word [edi]
mov eax, ecx
cmp eax, 0x5b
je 0x4128c3
test ax, ax
jne 0x4127ce
add edi, 2
dec ebx
jmp 0x4128bb
cmp eax, 0x3b
jne 0x4127f9
mov ecx, edi
lea edx, [ecx + 2]
jmp 0x4127e0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4127e0
sub ecx, edx
sar ecx, 1
sub ebx, ecx
lea edi, [edi + ecx*2]
jmp 0x4128bb
test cx, cx
jne 0x412802
xor ecx, ecx
jmp 0x412816
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412807
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x5c]
call fcn.004058d0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412825
push dword [ebp - 0x90]
mov esi, dword [ebp - 0x94]
sub ecx, edx
sar ecx, 1
or eax, 0xffffffff
sub eax, ecx
lea edi, [edi + ecx*2]
add ebx, eax
add edi, 2
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
xor ecx, ecx
mov dword [ebp - 0x30], 0
mov word [eax], cx
push esi
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x94]
call fcn.00412ce0
push ecx
lea eax, [ebp - 0x94]
push eax
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x5c]
call fcn.0047d870
lea eax, [ebp - 0x94]
push eax
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x80]
call fcn.00413e80
add esp, 0xc
push eax
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 5
call fcn.00412d70
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 4
call fcn.00412030
test ebx, ebx
jne 0x412790
mov eax, dword [ebp - 0xa4]
lea ecx, [ebp - 0x28]
mov esi, dword [eax]
push ecx
lea ecx, [ebp - 0xa8]
push ecx
mov ecx, eax
call fcn.004131a0
cmp dword [eax], esi
jne 0x412904
lea eax, [ebp - 0xa0]
push eax
push ecx
mov ecx, dword [ebp - 0xa4]
lea eax, [ebp - 0x28]
push eax
call fcn.00413060
add esp, 4
mov ecx, eax
call fcn.00412e30
jmp 0x412967
push 0x613028
lea ecx, [ebp - 0x74]
call fcn.004051f0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 6
call fcn.00405690
push 0x61302c
lea ecx, [ebp - 0x74]
call fcn.00405380
push 0xffffffffffffffff
push 0
push dword [ebp - 0xac]
lea ecx, [ebp - 0x74]
call fcn.00405690
lea ecx, [ebp - 0x74]
mov byte [ebp - 4], 4
call fcn.00405300
jmp 0x412967
test ax, ax
je 0x412967
add edi, 2
dec ebx
cmp word [edi], 0
jne 0x412957
jmp 0x412967
add edi, 2
dec ebx
test ebx, ebx
jne 0x4126d0
mov esi, dword [ebp - 0x88]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0xa0]
test esi, esi
je 0x4129ad
push dword [ebp - 0xa8]
mov edx, dword [ebp - 0x9c]
push ecx
mov ecx, esi
call fcn.004147a0
push esi
call fcn.0048166b
add esp, 0xc
mov bl, byte [ebp - 0x81]
cmp dword [ebp - 0x14], 8
jb 0x4129c4
push dword [ebp - 0x28]
call fcn.0048166b
add esp, 4
mov esi, dword [ebp - 0x94]
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
test esi, esi
je 0x4129ff
push dword [ebp - 0xa8]
mov edx, dword [ebp - 0x90]
push ecx
mov ecx, esi
call fcn.00414760
push esi
call fcn.0048166b
add esp, 0xc
cmp dword [ebp - 0x2c], 8
jb 0x412a10
push dword [ebp - 0x40]
call fcn.0048166b
add esp, 4
xor eax, eax
cmp dword [ebp - 0x48], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x412a35
push dword [ebp - 0x5c]
call fcn.0048166b
add esp, 4
mov al, bl
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.005a4646
mov esp, ebp
pop ebp
ret 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x4129b3