Function at 0x4a8750
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ca9b6
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
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 eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0xc]
push 0x4dae24
push eax
mov dword [ebp - 0x10c], edi
mov dword [ebp - 0x118], esi
mov byte [ebp - 0x101], 1
call fcn.004b4869
add esp, 8
mov dword [ebp - 0x110], eax
test eax, eax
jne 0x4a8807
test edi, edi
je 0x4a8800
lea ecx, [ebp - 0x108]
push ecx
call fcn.004a7400
add esp, 4
push eax
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.0040195e
mov eax, dword [ebp - 0x108]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a8800
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4a8960
test esi, esi
je 0x4a8815
mov ecx, dword [esi]
mov dword [ebp - 0x108], ecx
jmp 0x4a881f
mov dword [ebp - 0x108], 0
xor eax, eax
xor edx, edx
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
mov eax, dword [ebx]
mov word [ebp - 0x38], dx
mov ecx, dword [eax - 0xc]
xor esi, esi
mov dword [ebp - 0x114], ecx
test ecx, ecx
je 0x4a88a3
push esi
push eax
push esi
call fcn.004a69c0
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.0047c9d3
mov ebx, dword [ebx]
push esi
mov edi, eax
push ebx
push edi
call fcn.004a69c0
mov ecx, dword [ebp - 0x110]
push ecx
push 1
push esi
push edi
call fcn.004b49d7
cmp eax, 1
push edi
sete bl
call fcn.0047ecd6
mov ecx, dword [ebp - 0x114]
mov edi, dword [ebp - 0x10c]
add esp, 0x30
jmp 0x4a88a9
mov bl, byte [ebp - 0x101]
push esi
lea edx, [ebp - 0x38]
push edx
push ecx
lea eax, [ebp - 0x100]
push str._d_wide_chars_to__s_d_bytes
push eax
call fcn.00480a5a
add esp, 0x14
test edi, edi
je 0x4a88ee
lea eax, [ebp - 0x100]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a88d0
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x100]
push ecx
mov ecx, edi
call fcn.0040170b
test bl, bl
jne 0x4a893d
test edi, edi
je 0x4a893d
lea edx, [ebp - 0x10c]
push edx
call fcn.004a7400
add esp, 4
push eax
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.0040195e
mov eax, dword [ebp - 0x10c]
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 0x4a893d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x110]
push ecx
call fcn.004981a4
mov eax, dword [ebp - 0x118]
add esp, 4
test eax, eax
je 0x4a895e
mov edx, dword [ebp - 0x108]
mov dword [eax], edx
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.0047e4d2
mov esp, ebp
pop ebp
ret