Function at 0x459050
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4687c5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x3c], 0x46953c
mov dword [ebp - 0x1c], 0x469534
jne 0x459088
mov eax, 0x483918
lea ecx, [ebp + 0xb]
push 0
push ecx
push eax
lea ecx, [ebp - 0x3c]
call fcn.004010c6
lea edx, [ebp - 0x68]
mov dword [ebp - 4], 0
push edx
call fcn.00458ca0
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00401c5e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x10], edi
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x48]
neg eax
sbb eax, eax
mov byte [ebp - 4], 5
and eax, ecx
mov edx, dword [eax]
mov esi, dword [edx + 4]
add esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x68]
mov dword [esi], eax
neg ecx
sbb ecx, ecx
lea eax, [ebp - 0x54]
and ecx, eax
call fcn.0040407e
lea ecx, [ebp - 0x68]
lea edx, [ebp - 0x64]
neg ecx
sbb ecx, ecx
push 1
and ecx, edx
mov byte [ebp - 4], 4
call fcn.00401162
mov eax, dword [ebp - 0x68]
mov byte [ebp - 4], 3
mov ecx, dword [eax + 4]
mov edx, dword [ebp + ecx - 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x28]
mov dword [ebp + 8], eax
lea esi, [eax + eax + 2]
mov eax, dword [ebp - 0x24]
cmp esi, eax
jae 0x459151
test ecx, ecx
jne 0x45916f
push ecx
call fcn.004338ba
shr esi, 6
inc esi
shl esi, 6
push esi
mov dword [ebp - 0x24], esi
call fcn.004342c0
mov ecx, eax
add esp, 8
mov dword [ebp - 0x28], ecx
mov ebx, dword [ebp - 0x34]
test ebx, ebx
jne 0x459183
mov ebx, 0x469558
test ebx, ebx
jne 0x459183
xor eax, eax
jmp 0x4591a9
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + eax + 2]
mov eax, esi
add eax, 3
and al, 0xfc
call fcn.004349d0
mov eax, esp
push 0
push esi
push ebx
push eax
call fcn.0040d80b
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.00434a00
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x28]
add esp, 8
lea eax, [ebp - 0x14]
push 0
push eax
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test edi, edi
je 0x4591d8
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4591d8
push edi
call eax
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x1c]
neg eax
sbb eax, eax
and eax, ecx
mov edx, dword [eax]
mov esi, dword [edx + 4]
add esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
lea esi, [ebp - 0x3c]
neg esi
sbb esi, esi
lea eax, [ebp - 0x28]
and esi, eax
mov ecx, dword [esi]
push ecx
call fcn.004338ba
mov edx, dword [esi + 8]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
add esp, 4
push edx
call edi
lea esi, [ebp - 0x3c]
lea eax, [ebp - 0x38]
neg esi
sbb esi, esi
xor ebx, ebx
and esi, eax
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x459244
mov cl, byte [eax - 1]
test cl, cl
je 0x45923e
cmp cl, 0xff
je 0x45923e
dec cl
mov byte [eax - 1], cl
jmp 0x459244
add eax, 0xfffffffe
push eax
call edi
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx + 4]
mov eax, dword [ebp + edx - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x74]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4