Function at 0x402cc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x552278
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x5aa0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
movzx eax, byte [ebx + 0x9a4]
lea eax, [eax + eax*4]
inc eax
push eax
mov dword [ebp - 0x1c], eax
call fcn.004060f6
mov esi, eax
push 0x200
mov dword [ebp - 0x24], esi
call fcn.004060f6
push dword [ebp - 0x1c]
mov edi, eax
push 0
push esi
mov dword [ebp - 0x20], edi
call fcn.0052c260
push 0x200
push 0
push edi
call fcn.0052c260
mov al, byte [ebx + 0x9a4]
mov byte [esi], al
add esp, 0x20
xor esi, esi
cmp byte [ebx + 0x9a4], 0
jbe 0x402d76
mov ecx, dword [ebp - 0x24]
add ecx, 3
lea edx, [ebx + 0x9a7]
nop
movzx eax, word [edx - 2]
mov word [ecx - 2], ax
movzx eax, word [edx]
mov word [ecx], ax
mov al, byte [edx + 2]
mov byte [ecx + 2], al
movzx eax, byte [ebx + 0x9a4]
inc esi
lea edx, [edx + 5]
lea ecx, [ecx + 5]
cmp esi, eax
jl 0x402d50
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], 0
mov si, word [ebp - 0x18]
test al, al
je 0x402d9c
mov ecx, dword [ebp - 0x24]
movzx edx, al
mov edi, edi
movzx eax, byte [ecx]
add si, ax
lea ecx, [ecx + 1]
dec edx
jne 0x402d90
movzx eax, byte [ebx + 0x9a4]
push eax
push str.ATLAC_d_
push edi
mov dword [ebx + 0x8c8], 0
call fcn.0052a5a4
add esp, 0xc
cmp byte [ebx + 0x9a4], 0
mov dword [ebp - 0x1c], 0
jbe 0x402e2e
lea edx, [ebx + 0x9a8]
mov dword [ebp - 0x18], edx
mov ecx, edi
lea eax, [ecx + 1]
mov dword [ebp - 0x14], eax
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402de0
movzx eax, byte [edx + 1]
sub ecx, dword [ebp - 0x14]
push eax
movzx eax, byte [edx]
push eax
movzx eax, byte [edx - 1]
push eax
movzx eax, byte [edx - 2]
push eax
movzx eax, byte [edx - 3]
push eax
lea eax, [ecx + edi]
push str._02X_02X__02X_02X__d_
push eax
call fcn.0052a5a4
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
movzx eax, byte [ebx + 0x9a4]
inc ecx
add edx, 5
add esp, 0x1c
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
cmp ecx, eax
jl 0x402dd5
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x402e33
sub edx, ecx
movzx ecx, si
movzx eax, cl
push eax
shr ecx, 8
push ecx
lea eax, [edx + edi]
push str._02X_02X_r_n
push eax
call fcn.0052a5a4
add esp, 0x10
lea ecx, [edi + 1]
jmp 0x402e60
mov al, byte [edi]
inc edi
test al, al
jne 0x402e60
mov eax, dword [ebx + 0x8cc]
sub edi, ecx
test eax, eax
je 0x402ed8
cmp dword [eax + 0x1c], 0
je 0x402ed8
push dword [ebx + 0xbc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebx + 0x8cc]
mov dword [ebp - 0x1c], eax
cmp dword [eax + 0x1c], 0xffffffff
mov dword [ebp - 0x14], 0xffffffff
je 0x402ecc
cmp dword [ebp - 0x20], 0
je 0x402ecc
test edi, edi
je 0x402ecc
lea esi, [eax + 4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x1c]
push edi
push dword [ebp - 0x20]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebx + 0xbc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], eax
call fcn.0041676b
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x402efa
push 0x80004005
call fcn.004051d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov eax, 0x586834
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x402f33
movzx esi, ax
push esi
call fcn.0042046c
test eax, eax
je 0x402f42
push esi
push eax
lea ecx, [ebp - 0x18]
call fcn.00404ba0
jmp 0x402f42
push 0xc
push 0x586834
lea ecx, [ebp - 0x18]
call fcn.00404d40
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402f66
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x24]
call fcn.004060ff
push dword [ebp - 0x20]
call fcn.004060ff
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005290f9
mov esp, ebp
pop ebp
ret