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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
mov ebx, dword [0x4e7210]
push esi
push edi
push 1
push 0
push 0xffffffffffffffff
mov dword [esp + 0x1c], ecx
mov ecx, ebx
push 0
mov dword [esp + 0x34], ebx
call fcn.004a0a20
mov edi, dword [ebp + 8]
or eax, 0xffffffff
mov dword [esp + 0x14], eax
or edx, 0xffffffff
mov eax, dword [0x4e30f4]
mov byte [esp + 0xe], 0
mov byte [esp + 0x18], 0
mov dword [esp + 0x20], edx
mov ebx, dword [eax + 0xfc]
and ebx, 0x7fffffff
mov dword [esp + 0x2c], ebx
nop dword [eax]
mov esi, edi
movzx eax, word [esi]
cmp eax, 0x20
je 0x45a2ff
cmp eax, 9
jne 0x45a304
add esi, 2
jmp 0x45a2f2
cmp eax, 0x2a
jne 0x45a3f1
movzx ebx, word [esi + 2]
lea edi, [esi + 2]
test ebx, 0xffffff80
je 0x45a320
xor ecx, ecx
jmp 0x45a32e
push 2
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, eax
mov eax, ebx
and eax, 0xffffffdf
test ecx, ecx
cmove eax, ebx
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x45a347.68
movzx eax, byte [eax + 0x45a850]
jmp dword [eax*4 + 0x45a83c]
mov byte [esp + 0x18], 1
jmp case.0x45a347.68
add esi, 4
mov ecx, esi
call fcn.00404c80
test al, al
mov edx, 0xa
mov eax, 0x10
cmovne edx, eax
push edx
push 0
push esi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wcstoui64]
add esp, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], edx
mov edx, 0x4d05d4
mov ecx, edi
call fcn.00406570
mov edi, eax
test edi, edi
je 0x45a3d1
sub edi, 2
jmp case.0x45a347.68
lea eax, [esi + 4]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
add esp, 4
mov dword [esp + 0x2c], eax
jmp 0x45a383
mov byte [esp + 0xe], 1
cmp word [edi], 0
je 0x45a2f0
add edi, 2
cmp word [edi], 0
je 0x45a2f0
add edi, 2
jmp 0x45a2f0
mov eax, dword [0x4e30f4]
mov ecx, dword [esp + 0x10]
push 1
mov dword [eax + 0x30], 0x57
call fcn.00447710
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0x8000000
push 3
push 0
push 3
push connect
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, 0xffffffff
jne 0x45a438
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4e30f4]
push 1
mov dword [ecx + 0x30], eax
mov ecx, dword [esp + 0x14]
call fcn.00447710
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x34]
xorps xmm0, xmm0
push eax
push ebx
movq qword [esp + 0x38], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 0x30], esi
cmp esi, 0xffffffff
jne 0x45a468
call edi
test eax, eax
jne 0x45a475
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov eax, esi
and eax, ecx
cmp eax, 0xffffffff
jne 0x45a4d2
call edi
mov ecx, dword [0x4e30f4]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4e30f4]
test byte [eax + 0x100], 1
jne 0x45a4b4
mov ecx, dword [0x4e59cc]
push 1
push 0
push 0xffffffffffffffff
push 0x4d00fc
call fcn.004a0a20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x10]
push 0x4b9c40
push 0
push 0x4d00fc
call fcn.00447670
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esp + 0x20]
cmp ecx, edx
jb 0x45a4e8
mov eax, dword [esp + 0x14]
ja 0x45a4e4
cmp esi, eax
jbe 0x45a4e8
mov esi, eax
mov ecx, edx
test ecx, ecx
jne 0x45a81c
cmp esi, 0xfffffffd
ja 0x45a81c
mov eax, esi
or eax, ecx
jne 0x45a526
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4e30f4]
mov ecx, dword [esp + 0x10]
push 0
mov dword [eax + 0x30], 0
call fcn.00447710
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [esp + 0x18], 0
mov ebx, dword [esp + 0x24]
je 0x45a5f6
mov al, byte [ebx + 0x17]
test al, al
jne 0x45a542
mov eax, dword [ebx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
je 0x45a5f6
push 0
mov ecx, esi
mov byte [esp + 0x13], 1
shr ecx, 1
mov eax, esi
and eax, 1
push 1
add ecx, eax
push ecx
push 0
mov ecx, ebx
call fcn.004a0a20
cmp eax, 1
jne 0x45a626
push 0
push eax
mov ecx, ebx
call fcn.00401640
mov edi, eax
test edi, edi
je 0x45a626
push 0
lea eax, [esp + 0x20]
push eax
push esi
mov esi, dword [esp + 0x34]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4e30f4]
push esi
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x14]
test esi, esi
je 0x45a7c8
cmp byte [esp + 0x18], 0
jne 0x45a74f
mov ecx, dword [esp + 0x1c]
cmp ecx, 3
jb 0x45a63c
cmp byte [edi], 0xef
jne 0x45a63c
cmp byte [edi + 1], 0xbb
jne 0x45a63c
cmp byte [edi + 2], 0xbf
jne 0x45a63c
lea eax, [ecx - 3]
push 0xfde9
push eax
lea eax, [edi + 3]
push eax
jmp 0x45a6b4
lea eax, [esi + 2]
mov byte [esp + 0xf], 0
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x45a585
mov ecx, dword [esp + 0x10]
push 0x4b9c40
push eax
push 0x4cdb90
call fcn.00447a80
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp ecx, 2
jb 0x45a6a4
cmp byte [edi], 0xff
jne 0x45a6a4
cmp byte [edi + 1], 0xfe
jne 0x45a6a4
mov dl, 1
test dl, dl
lea eax, [ecx - 2]
push 0
cmove eax, ecx
mov ecx, ebx
shr eax, 1
test dl, dl
push 1
push eax
lea eax, [edi + 2]
cmove eax, edi
push eax
call fcn.004a0a20
neg eax
sbb eax, eax
and eax, esi
mov dword [esp + 0x14], eax
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, ebx
push 0
push 1
call fcn.00401640
cmp byte [esp + 0xe], 0
mov edi, eax
je 0x45a7eb
cmp byte [ebx + 0x17], 0
jne 0x45a6c5
mov esi, dword [ebx + 0xc]
jmp 0x45a6c7
mov eax, dword [esp + 0x2c]
xor dl, dl
cmp eax, 0x4b0
je 0x45a64e
push eax
push ecx
push edi
mov ecx, ebx
call fcn.004a1550
test eax, eax
jne 0x45a677
mov dword [esp + 0x14], eax
jmp 0x45a677
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45a6df
test byte [esi + 0x15], 8
je 0x45a6da
mov ecx, esi
call fcn.00401560
lea eax, [esi + 0xc]
jmp 0x45a6e4
mov eax, 0x4e9af0
mov eax, dword [eax]
mov edx, 0x4d84e4
shr eax, 1
mov ecx, edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4d8f2c
call fcn.0049ce30
add esp, 0x18
cmp byte [ebx + 0x17], 0
jne 0x45a718
mov esi, dword [ebx + 0xc]
jmp 0x45a71a
mov esi, ebx
cmp byte [esi + 0x17], 1
jne 0x45a73d
test byte [esi + 0x15], 8
je 0x45a72d
mov ecx, esi
call fcn.00401560
mov eax, dword [esp + 0x2c]
add esi, 0xc
add eax, eax
mov dword [esi], eax
jmp 0x45a7eb
mov eax, dword [esp + 0x2c]
mov esi, 0x4e9af0
add eax, eax
mov dword [esi], eax
jmp 0x45a7eb
mov al, byte [ebx + 0x17]
test al, al
jne 0x45a75c
mov eax, dword [ebx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
jne 0x45a79e
mov edx, dword [esp + 0x1c]
mov ecx, edi
call fcn.004a0850
push edi
mov esi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
cmp esi, 1
jne 0x45a631
mov ecx, dword [0x4e59cc]
push esi
push 0
push 0xffffffffffffffff
push 0x4b9d08
call fcn.004a0a20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
test al, 1
je 0x45a7b3
mov byte [eax + edi], 0
inc eax
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov word [eax + edi], cx
mov ecx, ebx
call fcn.00425530
mov ecx, dword [esp + 0x2c]
mov dword [eax], ecx
jmp 0x45a7eb
xor eax, eax
mov ecx, ebx
mov word [edi], ax
call fcn.00425530
cmp byte [esp + 0xf], 0
mov dword [eax], 0
jne 0x45a7eb
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [esp + 0x18]
mov ecx, ebx
call fcn.00427c50
test eax, eax
je 0x45a631
cmp dword [esp + 0x14], 0
mov ecx, dword [esp + 0x10]
sete al
movzx eax, al
push eax
call fcn.00447710
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x10]
push 0x4b9c40
push 0
push 0x4cdb90
call fcn.00447a80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4