Function at 0x4950a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b3c86
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x4e0240]
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 0x4c27e8
push eax
mov dword [ebp - 0x10c], edi
mov dword [ebp - 0x118], esi
mov byte [ebp - 0x101], 1
call fcn.004a20d9
add esp, 8
mov dword [ebp - 0x110], eax
test eax, eax
jne 0x495157
test edi, edi
je 0x495150
lea ecx, [ebp - 0x108]
push ecx
call fcn.00493d50
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 0x495150
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4952b0
test esi, esi
je 0x495165
mov ecx, dword [esi]
mov dword [ebp - 0x108], ecx
jmp 0x49516f
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 0x4951f3
push esi
push eax
push esi
call fcn.00493310
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.0046cbb3
mov ebx, dword [ebx]
push esi
mov edi, eax
push ebx
push edi
call fcn.00493310
mov ecx, dword [ebp - 0x110]
push ecx
push 1
push esi
push edi
call fcn.004a2247
cmp eax, 1
push edi
sete bl
call fcn.0046ec56
mov ecx, dword [ebp - 0x114]
mov edi, dword [ebp - 0x10c]
add esp, 0x30
jmp 0x4951f9
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.004709da
add esp, 0x14
test edi, edi
je 0x49523e
lea eax, [ebp - 0x100]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x495220
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x100]
push ecx
mov ecx, edi
call fcn.0040170b
test bl, bl
jne 0x49528d
test edi, edi
je 0x49528d
lea edx, [ebp - 0x10c]
push edx
call fcn.00493d50
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 0x49528d
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.00487f04
mov eax, dword [ebp - 0x118]
add esp, 4
test eax, eax
je 0x4952ae
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.0046e452
mov esp, ebp
pop ebp
ret