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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x4fd110]
push ebx
push esi
push edi
push 1
push 0
push 0xffffffffffffffff
mov dword [esp + 0x20], ecx
mov ecx, eax
push 0
mov dword [esp + 0x20], eax
call fcn.004b01a0
mov esi, dword [ebp + 8]
or eax, 0xffffffff
mov dword [esp + 0x1c], eax
mov eax, dword [0x4f898c]
mov byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
mov dword [esp + 0x20], 0xffffffff
mov ebx, dword [eax + 0xdc]
and ebx, 0x7fffffff
mov dword [esp + 0x24], ebx
nop dword [eax]
mov edi, esi
mov al, byte [edi]
cmp al, 0x20
je 0x46235c
cmp al, 9
jne 0x46235f
inc edi
jmp 0x462352
cmp al, 0x2a
jne 0x46249a
mov bl, byte [edi + 1]
lea esi, [edi + 1]
movzx eax, bl
test eax, 0xffffff80
je 0x46237b
xor edx, edx
jmp 0x462388
push 2
push eax
call fcn.004c7451
add esp, 8
mov edx, eax
mov al, bl
and al, 0xdf
test edx, edx
movzx ecx, al
movzx eax, bl
cmove ecx, eax
movsx eax, cl
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x4623ad.68
movzx eax, byte [eax + 0x462938]
jmp dword [eax*4 + 0x462924]
mov byte [esp + 0xd], 1
jmp case.0x4623ad.68
lea ecx, [edi + 2]
call fcn.0044f4a0
mov bl, byte [esi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
test bl, bl
je 0x4623f4
mov ecx, 0x4e902c
mov al, 0x20
nop dword [eax + eax]
cmp bl, al
je 0x462428
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x4623e0
mov bl, byte [esi + 1]
inc esi
test bl, bl
jne 0x4623d4
mov eax, dword [0x4f898c]
mov dword [eax + 0x30], 0x57
test byte [eax + 0xe0], 1
jne 0x46247c
mov ecx, dword [0x4fb94c]
push 1
push 0
push 0xffffffffffffffff
push 0x4e37f8
call fcn.004b01a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
dec esi
jmp case.0x4623ad.68
lea eax, [edi + 2]
push eax
call fcn.004c4df6
mov dl, byte [esi]
add esp, 4
mov dword [esp + 0x24], eax
test dl, dl
je 0x4623f4
mov ecx, 0x4e902c
mov al, 0x20
cmp dl, al
je 0x462428
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x462448
mov dl, byte [esi + 1]
inc esi
test dl, dl
jne 0x462441
jmp 0x4623f4
mov byte [esp + 0xe], 1
cmp byte [esi], 0
je 0x462350
inc esi
cmp byte [esi], 0
je 0x462350
inc esi
jmp 0x462350
mov ecx, dword [esp + 0x14]
push 0x4e3371
push 0
push 0x4e37f8
call fcn.0044d4a0
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 esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4624d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4f898c]
test byte [ecx + 0xe0], 1
mov dword [ecx + 0x30], eax
jmp 0x462407
lea eax, [esp + 0x2c]
xorps xmm0, xmm0
push eax
push ebx
movq qword [esp + 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x462505
call edi
test eax, eax
jne 0x462512
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov eax, esi
and eax, ecx
cmp eax, 0xffffffff
jne 0x46252e
call edi
mov ecx, dword [0x4f898c]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4f898c]
jmp 0x462400
mov edx, dword [esp + 0x20]
cmp ecx, edx
jb 0x462544
mov eax, dword [esp + 0x1c]
ja 0x462540
cmp esi, eax
jbe 0x462544
mov esi, eax
mov ecx, edx
test ecx, ecx
jne 0x462905
cmp esi, 0xfffffffd
ja 0x462905
mov eax, esi
or eax, ecx
jne 0x46258d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4f898c]
mov dword [eax + 0x30], 0
mov ecx, dword [0x4fb94c]
push 1
push 0
push 0xffffffffffffffff
push 0x4e33f8
call fcn.004b01a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [esp + 0xd], 0
je 0x462664
mov edi, dword [esp + 0x10]
mov al, byte [edi + 0x17]
test al, al
jne 0x4625a9
mov eax, dword [edi + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
je 0x462664
push 0
push 1
lea eax, [esi + 1]
mov byte [esp + 0x17], 1
push eax
push 0
mov ecx, edi
call fcn.004b01a0
cmp eax, 1
jne 0x462693
push 0
push eax
mov ecx, edi
call fcn.00401670
mov edi, eax
test edi, edi
je 0x462693
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4f898c]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x46285d
cmp byte [esp + 0xd], 0
jne 0x4627ec
mov ecx, dword [esp + 0x18]
cmp ecx, 3
jb 0x4626a5
cmp byte [edi], 0xef
jne 0x4626a5
cmp byte [edi + 1], 0xbb
jne 0x4626a5
cmp byte [edi + 2], 0xbf
jne 0x4626a5
mov esi, dword [esp + 0x10]
lea eax, [ecx - 3]
push 0xfde9
push eax
lea eax, [edi + 3]
mov ecx, esi
push eax
call fcn.004b0d10
test eax, eax
jne 0x462738
xor ebx, ebx
jmp 0x46273c
lea eax, [esi + 2]
mov byte [esp + 0xf], 0
push eax
call fcn.004c4e35
mov edi, eax
add esp, 4
test edi, edi
jne 0x4625e4
mov ecx, dword [esp + 0x14]
push 0x4e3371
push eax
push str.Out_of_memory.
call fcn.0044d920
push ebx
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 0x4626e5
cmp byte [edi], 0xff
jne 0x4626e5
cmp byte [edi + 1], 0xfe
jne 0x4626e5
mov dl, 1
sub esp, 0xc
lea eax, [ecx - 2]
test dl, dl
cmove eax, ecx
mov ecx, dword [esp + 0x1c]
shr eax, 1
test dl, dl
push eax
lea eax, [edi + 2]
cmove eax, edi
push eax
call fcn.004b0de0
neg eax
sbb eax, eax
and eax, esi
mov esi, dword [esp + 0x10]
mov ebx, eax
jmp 0x46273c
mov ebx, dword [esp + 0x24]
xor dl, dl
cmp ebx, 0x4b0
je 0x4626b7
test ebx, ebx
je 0x46271e
call dword [sym.imp.KERNEL32.dll_GetACP]
cmp ebx, eax
je 0x46271a
mov esi, dword [esp + 0x10]
mov ecx, esi
push ebx
push dword [esp + 0x1c]
push edi
call fcn.004b0d10
test eax, eax
jne 0x462738
xor ebx, ebx
jmp 0x46273c
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov byte [ecx + edi], 0
mov ecx, esi
push dword [esp + 0x18]
push edi
call fcn.004b0890
mov ebx, dword [esp + 0x1c]
jmp 0x462745
mov ebx, dword [esp + 0x1c]
push edi
call fcn.004c4247
add esp, 4
push 0
push 1
mov ecx, esi
call fcn.00401670
cmp byte [esp + 0xe], 0
mov edi, eax
je 0x4628ac
cmp byte [esi + 0x17], 0
jne 0x462766
mov esi, dword [esi + 0xc]
cmp byte [esi + 0x17], 1
jne 0x46277e
test byte [esi + 0x15], 8
je 0x462779
mov ecx, esi
call fcn.004014d0
lea eax, [esi + 0xc]
jmp 0x462783
mov eax, 0x4ff514
mov eax, dword [eax]
mov edx, 0x4ee75c
mov dword [esp + 0x24], eax
mov ecx, edi
lea eax, [esp + 0x24]
push eax
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4eecb0
call fcn.004ac240
mov eax, dword [esp + 0x28]
add esp, 0x18
cmp byte [eax + 0x17], 0
jne 0x4627b9
mov esi, dword [eax + 0xc]
jmp 0x4627bb
mov esi, eax
cmp byte [esi + 0x17], 1
jne 0x4627dc
test byte [esi + 0x15], 8
je 0x4627ce
mov ecx, esi
call fcn.004014d0
mov eax, dword [esp + 0x24]
add esi, 0xc
mov dword [esi], eax
jmp 0x4628a8
mov eax, dword [esp + 0x24]
mov esi, 0x4ff514
mov dword [esi], eax
jmp 0x4628a8
mov ecx, dword [esp + 0x10]
mov al, byte [ecx + 0x17]
test al, al
jne 0x4627fd
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
jne 0x462825
mov edx, dword [esp + 0x18]
mov ecx, edi
call fcn.004affd0
push edi
mov esi, eax
call fcn.004c4247
add esp, 4
cmp esi, 1
jne 0x4628d4
jmp 0x46256e
mov ebx, dword [esp + 0x18]
mov byte [ebx + edi], 0
cmp byte [ecx + 0x17], 0
jne 0x462838
mov esi, dword [ecx + 0xc]
jmp 0x46283a
mov esi, ecx
cmp byte [esi + 0x17], 1
jne 0x462854
test byte [esi + 0x15], 8
je 0x46284d
mov ecx, esi
call fcn.004014d0
add esi, 0xc
mov dword [esi], ebx
jmp 0x4628a4
mov esi, 0x4ff514
mov dword [esi], ebx
jmp 0x4628a4
mov eax, dword [esp + 0x10]
mov byte [edi], 0
cmp byte [eax + 0x17], 0
jne 0x46286f
mov esi, dword [eax + 0xc]
jmp 0x462871
mov esi, eax
cmp byte [esi + 0x17], 1
jne 0x462889
test byte [esi + 0x15], 8
je 0x462884
mov ecx, esi
call fcn.004014d0
add esi, 0xc
jmp 0x46288e
mov esi, 0x4ff514
cmp byte [esp + 0xf], 0
mov dword [esi], 0
jne 0x4628a4
push edi
call fcn.004c4247
add esp, 4
mov ebx, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
cmp byte [esi + 0x17], 0
jne 0x4628b5
mov esi, dword [esi + 0xc]
cmp byte [esi + 0x17], 2
jne 0x4628df
cmp dword [0x4fda78], 0
je 0x4628df
push 1
mov ecx, 0x4fda6c
call fcn.00406230
test eax, eax
jne 0x4628f3
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov al, byte [esi + 0x15]
and al, 0x86
cmp byte [esp + 0xd], 0
mov byte [esi + 0x15], al
je 0x4628f3
or al, 1
mov byte [esi + 0x15], al
test ebx, ebx
jne 0x46256e
mov eax, dword [0x4f898c]
jmp 0x462400
mov ecx, dword [esp + 0x14]
push 0x4e3371
push 0
push str.Out_of_memory.
call fcn.0044d920
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4