Function at 0x46c190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47cf55
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], 0x47e5a0
mov dword [ebp - 0x1c], 0x47e598
jne 0x46c1c8
mov eax, 0x49cc4c
lea ecx, [ebp + 0xb]
push 0
push ecx
push eax
lea ecx, [ebp - 0x3c]
call fcn.00408d43
lea edx, [ebp - 0x68]
mov dword [ebp - 4], 0
push edx
call fcn.0046bde0
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00401992
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.00416c37
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.0040185b
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 0x46c291
test ecx, ecx
jne 0x46c2af
push ecx
call fcn.004454c4
shr esi, 6
inc esi
shl esi, 6
push esi
mov dword [ebp - 0x24], esi
call fcn.004461c7
mov ecx, eax
add esp, 8
mov dword [ebp - 0x28], ecx
mov ebx, dword [ebp - 0x34]
test ebx, ebx
jne 0x46c2c3
mov ebx, 0x47e5b8
test ebx, ebx
jne 0x46c2c3
xor eax, eax
jmp 0x46c2e9
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.004468d0
mov eax, esp
push 0
push esi
push ebx
push eax
call fcn.0046cb10
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.00446920
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 0x46c318
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x46c318
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.004454c4
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 0x46c384
mov cl, byte [eax - 1]
test cl, cl
je 0x46c37e
cmp cl, 0xff
je 0x46c37e
dec cl
mov byte [eax - 1], cl
jmp 0x46c384
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