Function at 0x46adc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x406c
call fcn.00537290
mov eax, dword [0x5f5ea4]
xor eax, esp
mov dword [esp + 0x4068], eax
push ebx
push esi
push edi
mov ecx, 1
mov edx, 0x5feaec
mov eax, 0x3e7
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x46b070
mov eax, dword [ebp + 8]
lea edi, [esp + 0x70]
test eax, eax
mov ecx, 0x5e0c9c
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.00456fc0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.0055917e
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
test eax, eax
js 0x46ae4a
cmp eax, 0xfff
ja 0x46ae4a
jne 0x46ae5e
jmp 0x46ae4f
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 0x46ae97
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.0046aa60
cmp esi, 0x8007007a
jne 0x46ae99
mov eax, dword [esp + 0x18]
mov edi, eax
lea eax, [esp + 0x70]
sub edi, eax
and edi, 0xfffffffe
test edi, edi
jle 0x46b070
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 0x5fead4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test esi, esi
je 0x46b019
mov ecx, dword [0x5fead0]
test cl, 2
je 0x46af55
mov edx, dword [0x5f6d78]
cmp edx, 0xffffffff
je 0x46af55
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 [0x5f6d78]
call esi
push 0
lea eax, [esp + 0x1c]
push eax
push 4
push 0x5e1d50
push dword [0x5f6d78]
call esi
mov ecx, dword [0x5fead0]
test cl, 1
je 0x46b019
push 0x2000
lea eax, [esp + 0x2074]
push 0
push eax
call fcn.0054e940
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.0046a890
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 0x46b013
lea ecx, [edi*2 + 2]
call fcn.0045c130
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 0x46b00a
mov edx, esi
call fcn.0046b110
push eax
call fcn.0046b3c0
add esp, 4
push esi
call fcn.0055224a
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x5fead4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x5fc98c], 0
je 0x46b070
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 [0x5fc98c]
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov ecx, dword [esp + 0x4074]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005368a5
mov esp, ebp
pop ebp
ret