Function at 0x46b090
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x406c
call fcn.00537550
mov eax, dword [0x5f6ea4]
xor eax, esp
mov dword [esp + 0x4068], eax
push ebx
push esi
push edi
mov ecx, 1
mov edx, 0x5ffaf0
mov eax, 0x3e7
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x46b340
mov eax, dword [ebp + 8]
lea edi, [esp + 0x70]
test eax, eax
mov ecx, 0x5e1c9c
cmovne ecx, eax
lea eax, [ebp + 0xc]
push eax
xor esi, esi
mov eax, edi
push esi
push ecx
push 0xfff
push eax
call fcn.004570a0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.0055943e
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x46b11a
cmp eax, 0xfff
ja 0x46b11a
jne 0x46b12e
jmp 0x46b11f
mov esi, 0x8007007a
xor eax, eax
mov word [esp + 0x206e], ax
mov eax, 0xfff
lea eax, [esp + eax*2 + 0x70]
mov dword [esp + 0x18], eax
test esi, esi
jns 0x46b167
push 0x500
lea eax, [esp + 0x20]
mov edx, 0x2000
push eax
lea eax, [esp + 0x20]
push eax
push ecx
lea ecx, [esp + 0x80]
call fcn.0046ad30
cmp esi, 0x8007007a
jne 0x46b169
mov eax, dword [esp + 0x18]
mov edi, eax
lea eax, [esp + 0x70]
sub edi, eax
and edi, 0xfffffffe
test edi, edi
jle 0x46b340
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x2c]
push eax
movzx eax, word [esp + 0x2e]
push eax
movzx eax, word [esp + 0x30]
push eax
lea eax, [esp + 0x3c]
push str.__02d:_02d:_02d_
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
mov esi, eax
push 0x5ffad8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test esi, esi
je 0x46b2e9
mov ecx, dword [0x5ffad4]
test cl, 2
je 0x46b225
mov edx, dword [0x5f7d90]
cmp edx, 0xffffffff
je 0x46b225
push 0
lea eax, [esp + 0x1c]
push eax
lea eax, [esi + esi]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [esp + 0x3c]
push eax
push edx
call esi
push 0
lea eax, [esp + 0x1c]
push eax
push edi
lea eax, [esp + 0x7c]
push eax
push dword [0x5f7d90]
call esi
push 0
lea eax, [esp + 0x1c]
push eax
push 4
push 0x5e2d90
push dword [0x5f7d90]
call esi
mov ecx, dword [0x5ffad4]
test cl, 1
je 0x46b2e9
push 0x2000
lea eax, [esp + 0x2074]
push 0
push eax
call fcn.0054ec00
add esp, 0xc
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x34]
push eax
push str._s__s
push 0x500
push 0
push 0
lea eax, [esp + 0x2088]
push 0x2000
push eax
call fcn.0046ab60
add esp, 0x20
lea eax, [esp + 0x2070]
push eax
call ebx
push 0
push 0
push 0
push 0
mov ebx, eax
lea eax, [esp + 0x2080]
push ebx
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x46b2e3
lea ecx, [edi*2 + 2]
call fcn.0045c420
push 0
push 0
push edi
mov esi, eax
lea eax, [esp + 0x207c]
push esi
push ebx
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x46b2da
mov edx, esi
call fcn.0046b3e0
push eax
call fcn.0046b690
add esp, 4
push esi
call fcn.0055250a
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x5ffad8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x5fd990], 0
je 0x46b340
lea eax, [esp + 0x70]
mov dword [esp + 0xc], 0
push eax
call ebx
lea eax, [eax*2 + 2]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x70]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push eax
push 0xfa
push 2
lea eax, [esp + 0x18]
push eax
push 1
push 0x4a
push dword [0x5fd990]
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov ecx, dword [esp + 0x4074]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00536b66
mov esp, ebp
pop ebp
ret