Function at 0x4a84f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ca96b
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x4fca20]
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 ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
push 0x4dade4
push ecx
mov dword [ebp - 0x114], edi
mov dword [ebp - 0x10c], eax
call fcn.004b4869
mov esi, eax
add esp, 8
mov dword [ebp - 0x110], esi
test esi, esi
jne 0x4a859e
test edi, edi
je 0x4a8597
lea edx, [ebp - 0x104]
push edx
call fcn.004a7400
add esp, 4
push eax
mov ecx, edi
mov dword [ebp - 4], esi
call fcn.0040195e
mov eax, dword [ebp - 0x104]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a8597
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4a8726
mov eax, dword [ebp - 0x10c]
test eax, eax
je 0x4a85b2
mov ecx, dword [eax]
mov dword [ebp - 0x104], ecx
jmp 0x4a85bc
mov dword [ebp - 0x104], 0
xor eax, eax
xor edx, edx
mov ecx, ebx
mov word [ebp - 0x38], dx
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x2e], eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
call fcn.00401417
push 2
push 0
push esi
call fcn.004b472f
push esi
call fcn.004b4640
push 0
push 0
push esi
mov edi, eax
call fcn.004b472f
add esp, 0x1c
xor esi, esi
test edi, edi
je 0x4a86ba
push edi
call fcn.0047c9d3
mov esi, eax
mov eax, dword [ebp - 0x110]
push eax
push 1
push edi
push esi
mov dword [ebp - 0x108], esi
call fcn.004b448f
push edi
push esi
push 0
call fcn.004a5f80
mov esi, eax
add esp, 0x20
test esi, esi
jns 0x4a864d
push 0x80070057
call fcn.00401000
mov eax, dword [ebx]
mov edx, dword [eax - 8]
mov ecx, 1
sub ecx, dword [eax - 4]
sub edx, esi
or ecx, edx
jge 0x4a8668
push esi
mov ecx, ebx
call fcn.00401485
mov eax, dword [ebp - 0x108]
mov ecx, dword [ebx]
push edi
push eax
push ecx
call fcn.004a5f80
add esp, 0xc
mov eax, esi
cmp esi, 0xffffffff
jne 0x4a8695
mov eax, dword [ebx]
mov ecx, dword [eax - 8]
test eax, eax
je 0x4a8699
push ecx
push eax
call fcn.00480cec
add esp, 8
test eax, eax
js 0x4a8643
mov ecx, dword [ebx]
cmp eax, dword [ecx - 8]
jg 0x4a8643
mov dword [ecx - 0xc], eax
mov edx, dword [ebx]
xor ecx, ecx
mov word [edx + eax*2], cx
mov edx, dword [ebp - 0x108]
push edx
call fcn.0047ecd6
add esp, 4
push esi
push edi
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x100]
push str._s_d_bytes_to__d_wide_chars
push ecx
call fcn.00480a5a
mov ecx, dword [ebp - 0x114]
add esp, 0x14
test ecx, ecx
je 0x4a8703
lea eax, [ebp - 0x100]
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x4a86e7
sub eax, esi
sar eax, 1
push eax
lea edx, [ebp - 0x100]
push edx
call fcn.0040170b
mov eax, dword [ebp - 0x110]
push eax
call fcn.004981a4
mov eax, dword [ebp - 0x10c]
add esp, 4
test eax, eax
je 0x4a8724
mov ecx, dword [ebp - 0x104]
mov dword [eax], ecx
mov al, 1
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.0047e4d2
mov esp, ebp
pop ebp
ret