Function at 0x45ba10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [0x4e7de0]
push esi
mov esi, ecx
push edi
mov ecx, ebp
mov dword [esp + 0x18], ebp
call fcn.004269a0
or eax, 0xffffffff
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov eax, dword [0x4e4b24]
mov eax, dword [eax + 0xfc]
and eax, 0x7fffffff
mov byte [esp + 0x16], 0
mov byte [esp + 0x1c], 0
mov dword [esp + 0x24], eax
mov eax, esi
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x45ba62
cmp ecx, 9
jne 0x45ba67
add eax, 2
jmp 0x45ba55
cmp word [eax], 0x2a
jne 0x45bb4e
movzx edi, word [eax + 2]
lea esi, [eax + 2]
test edi, 0xffffff80
jne 0x45ba93
push 2
push edi
call dword [sym.imp.MSVCR100.dll__isctype]
add esp, 8
test eax, eax
je 0x45ba93
and edi, 0xffffffdf
movzx eax, di
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x45baa9.68
movzx ecx, byte [eax + 0x45bf88]
jmp dword [ecx*4 + 0x45bf74]
mov byte [esp + 0x1c], 1
jmp case.0x45baa9.68
lea edi, [esi + 2]
mov eax, edi
call fcn.00403d70
movzx edx, al
neg edx
sbb edx, edx
and edx, 6
add edx, 0xa
push edx
push 0
push edi
call dword [sym.imp.MSVCR100.dll__wcstoui64]
mov dword [esp + 0x34], eax
add esp, 0xc
mov ebx, 0x4bfcf4
mov eax, esi
mov dword [esp + 0x2c], edx
call fcn.00405590
mov esi, eax
test esi, esi
je 0x45bf07
sub esi, 2
jmp case.0x45baa9.68
lea eax, [esi + 2]
push eax
call dword [sym.imp.MSVCR100.dll__wtoi]
mov dword [esp + 0x28], eax
add esp, 4
mov ebx, 0x4bfcf4
mov eax, esi
call fcn.00405590
mov esi, eax
test esi, esi
je 0x45bf1f
sub esi, 2
jmp case.0x45baa9.68
mov byte [esp + 0x16], 1
cmp word [esi], 0
je 0x45ba53
add esi, 2
cmp word [esi], 0
je 0x45ba53
add esi, 2
jmp 0x45ba53
push 0
push 0x8000000
push 3
push 0
push 3
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x45bbaa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4e4b24]
test byte [ecx + 0x100], 1
mov dword [ecx + 0x30], eax
jne 0x45bf55
mov eax, dword [0x4e86f0]
push 1
push 0
push 0xffffffffffffffff
push 0x4bf81c
push eax
call fcn.004a2810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov ecx, ebx
call fcn.0049f6a0
mov edi, eax
mov ecx, edi
and ecx, edx
cmp ecx, 0xffffffff
jne 0x45bbe5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x4e4b24]
push ebx
mov dword [edx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x34]
call fcn.0044b7c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [esp + 0x2c]
cmp edx, eax
jb 0x45bbfb
ja 0x45bbf5
cmp edi, dword [esp + 0x28]
jbe 0x45bbfb
mov edi, dword [esp + 0x28]
mov edx, eax
test edx, edx
jne 0x45bc04
cmp edi, 0xfffffffd
jbe 0x45bc23
mov ecx, dword [esp + 0x34]
push 0x4bd2c4
push 0
push 0x4bd2fc
call fcn.00449ae0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, edi
or eax, edx
jne 0x45bc5e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x4e86f0]
mov ecx, dword [0x4e4b24]
push 1
push 0
push 0xffffffffffffffff
push 0x4bbb9c
push edx
mov dword [ecx + 0x30], 0
call fcn.004a2810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
cmp byte [esp + 0x1c], 0
je 0x45bcbb
mov al, byte [ebp + 0x17]
test al, al
jne 0x45bc72
mov eax, dword [ebp + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
je 0x45bcbb
push 0
mov ecx, edi
mov edx, edi
push 1
shr ecx, 1
and edx, 1
add ecx, edx
push ecx
push 0
push ebp
mov byte [esp + 0x2b], 1
call fcn.004a2810
cmp eax, 1
jne 0x45bca8
push 0
push eax
mov ecx, ebp
call fcn.00401220
mov esi, eax
test esi, esi
jne 0x45bcfa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
lea eax, [edi + 2]
push eax
mov byte [esp + 0x1b], 0
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x45bcfa
mov ecx, dword [esp + 0x34]
push 0x4bd2c4
push eax
push 0x4bd2fc
call fcn.00449ae0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
push 0
lea ecx, [esp + 0x24]
push ecx
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x4e4b24]
push ebx
mov dword [edx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x45beb0
cmp byte [esp + 0x1c], 0
jne 0x45be32
mov eax, dword [esp + 0x20]
cmp eax, 3
jb 0x45bd68
cmp byte [esi], 0xef
jne 0x45bd68
cmp byte [esi + 1], 0xbb
jne 0x45bd68
cmp byte [esi + 2], 0xbf
jne 0x45bd68
mov edi, dword [esp + 0x18]
add eax, 0xfffffffd
push eax
lea eax, [esi + 3]
push eax
push edi
mov ebx, 0xfde9
call fcn.004a3410
jmp 0x45bda4
cmp eax, 2
jb 0x45be0f
cmp byte [esi], 0xff
jne 0x45be0f
cmp byte [esi + 1], 0xfe
jne 0x45be0f
mov dl, 1
mov ecx, esi
test dl, dl
je 0x45bd92
lea ecx, [esi + 2]
add eax, 0xfffffffe
mov edi, dword [esp + 0x18]
push 0
push 1
shr eax, 1
push eax
push ecx
push edi
call fcn.004a2810
test eax, eax
jne 0x45bdaa
xor ebp, ebp
test esi, esi
je 0x45bdb8
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
push 0
push 1
mov ecx, edi
call fcn.00401220
cmp byte [esp + 0x16], 0
mov esi, eax
je 0x45bed5
mov ebx, dword [esp + 0x18]
mov eax, ebx
call fcn.00424960
push 0
push 0xffffffffffffffff
push 1
push 0x4daa5c
mov dword [esp + 0x34], eax
push 0x4d9fec
push esi
lea eax, [esp + 0x3c]
or ecx, 0xffffffff
call fcn.0049ede0
mov edi, dword [esp + 0x3c]
add esp, 0x18
mov eax, ebx
call fcn.00426cd0
jmp 0x45bed5
mov ebx, dword [esp + 0x24]
xor dl, dl
cmp ebx, 0x4b0
je 0x45bd86
mov edi, dword [esp + 0x18]
push eax
push esi
push edi
call fcn.004a3410
jmp 0x45bda4
mov ecx, dword [esp + 0x18]
mov al, byte [ecx + 0x17]
test al, al
jne 0x45be43
mov ecx, dword [ecx + 0xc]
mov al, byte [ecx + 0x17]
cmp al, 2
jne 0x45be8e
mov edx, dword [esp + 0x20]
push edx
mov ecx, esi
call fcn.004a2650
lea edi, [eax - 1]
add esp, 4
neg edi
push esi
sbb edi, edi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
inc edi
je 0x45bcaf
mov eax, dword [0x4e86f0]
push 1
push 0
push 0xffffffffffffffff
push 0x4bbb9c
push eax
call fcn.004a2810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [esp + 0x20]
mov edi, eax
test al, 1
je 0x45be9d
mov byte [eax + esi], 0
inc edi
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov word [edi + esi], cx
call fcn.00424930
mov dword [eax], edi
jmp 0x45bed5
mov eax, dword [esp + 0x18]
xor edx, edx
mov word [esi], dx
call fcn.00424930
cmp byte [esp + 0x17], 0
mov dword [eax], 0
jne 0x45bed5
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
call fcn.00426d80
test eax, eax
je 0x45bcaf
mov edi, dword [esp + 0x34]
test ebp, ebp
sete cl
movzx edx, cl
push edx
call fcn.00449930
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov eax, dword [0x4e4b24]
test byte [eax + 0x100], 1
mov dword [eax + 0x30], 0x57
jmp 0x45bb84
mov eax, dword [0x4e4b24]
test byte [eax + 0x100], 1
mov dword [eax + 0x30], 0x57
jne 0x45bf55
mov ecx, dword [0x4e86f0]
push 1
push 0
push 0xffffffffffffffff
push 0x4bf81c
push ecx
call fcn.004a2810
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
mov edi, dword [esp + 0x34]
push 0x4bd2c4
push 0
push 0x4bf81c
call fcn.00449890
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4