Function at 0x402ac0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4103fb
mov eax, dword fs:[0]
push eax
sub esp, 0xa30
mov eax, dword [0x4152ac]
xor eax, esp
mov dword [esp + 0xa28], eax
push ebx
push esi
push edi
mov eax, dword [0x4152ac]
xor eax, esp
push eax
lea eax, [esp + 0xa40]
mov dword fs:[0], eax
mov esi, ecx
push esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
mov dword [esp + 0xa48], ebx
cmp byte [0x417bd0], bl
je 0x402d57
cmp dword [esi + 0x18], 0xffffffff
jne 0x402c51
push 0x206
lea eax, [esp + 0x32]
push ebx
push eax
mov word [esp + 0x38], bx
call fcn.00404780
add esp, 0xc
push 0x104
lea ecx, [esp + 0x30]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x2c]
push 0x5c
push edx
call fcn.00403f05
mov word [eax + 2], bx
push 0x206
lea eax, [esp + 0x242]
push ebx
push eax
mov word [esp + 0x248], bx
call fcn.00404780
xor eax, eax
add esp, 0x14
lea ecx, [esp + 0x14]
push ecx
mov word [esp + 0x18], bx
mov dword [esp + 0x1a], eax
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov word [esp + 0x26], ax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [esp + 0x1a]
movzx eax, word [esp + 0x16]
push edx
push eax
push str.Trace_d__d.log
mov eax, 0x208
lea edi, [esp + 0x240]
call fcn.00401440
mov eax, edi
add esp, 0xc
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402bd3
lea edi, [esp + 0x2c]
sub eax, edx
add edi, 0xfffffffe
jmp 0x402bf0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x402bf0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push ebx
push 0x80
push 4
push ebx
mov ecx, eax
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push 0x40000000
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x18], eax
jne 0x402c42
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
jmp 0x402d60
push 2
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [esp + 0x10]
push 0x3fe
lea edx, [esp + 0x63a]
push ebx
push edx
mov word [esp + 0x640], bx
call fcn.00404780
mov ecx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
push ecx
push 0x1ff
lea edx, [esp + 0x64c]
push 0x200
push edx
call fcn.00403dbd
add esp, 0x20
cmp eax, ebx
jl 0x402d4f
cmp eax, 0x1ff
ja 0x402d4f
jne 0x402cab
mov word [esp + 0xa32], bx
push 0x3fe
lea eax, [esp + 0x23a]
push ebx
push eax
mov word [esp + 0x240], bx
call fcn.00404780
xor eax, eax
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
mov word [esp + 0x18], bx
mov dword [esp + 0x1a], eax
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov word [esp + 0x26], ax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea edx, [esp + 0x634]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
movzx ecx, word [esp + 0x22]
movzx edx, word [esp + 0x20]
push eax
movzx eax, word [esp + 0x28]
push eax
movzx eax, word [esp + 0x26]
push ecx
movzx ecx, word [esp + 0x26]
push edx
push eax
push ecx
push str._d._d__02d:_02d:_02d___tid_d__s
mov eax, 0x400
lea edi, [esp + 0x254]
call fcn.00401440
add esp, 0x20
mov ecx, 0x200
mov eax, edi
lea esp, [esp]
cmp word [eax], bx
je 0x402d84
add eax, 2
sub ecx, 1
jne 0x402d40
jmp 0x402da7
mov word [esp + 0xa32], bx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov ecx, dword [esp + 0xa40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa28]
xor ecx, esp
call fcn.00403552
mov esp, ebp
pop ebp
ret
cmp ecx, ebx
je 0x402da7
mov eax, 0x200
sub eax, ecx
mov edx, 0x200
sub edx, eax
lea ecx, [esp + eax*2 + 0x234]
mov eax, 0x413654
call fcn.00401020
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x238]
mov dword [esp + 0x28], ebx
call fcn.004025c0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
push ebx
lea edx, [esp + 0x28]
push edx
push ecx
push eax
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
or edx, 0xffffffff
test eax, eax
mov eax, dword [esp + 0x10]
jne 0x402e02
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402d57
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x402d57
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402e1b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x402d60