Function at 0x40a090
Capabilities:
Print debug messages
Write file on windows

Disassembly:
sub esp, 0x140
mov eax, dword [0x4382c4]
xor eax, esp
mov dword [esp + 0x13c], eax
push esi
push edi
push 0xff
lea eax, [esp + 0x45]
push 0
push eax
mov esi, ecx
mov byte [esp + 0x4c], 0
call fcn.00420f50
add esp, 0xc
cmp dword [esi + 4], 0
je 0x40a2f0
mov ecx, dword [esi]
and ecx, 1
cmp dword [esi + ecx*4 + 0xc], 0
lea eax, [esi + ecx*4 + 0xc]
je 0x40a2f0
mov edx, dword [eax]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a0e6
sub eax, esi
je 0x40a2f0
push 0x42f39c
push edx
lea edx, [esp + 0x14]
push edx
call fcn.0041c26b
add esp, 0xc
test eax, eax
jne 0x40a2f0
mov word [esp + 0x10], ax
mov dword [esp + 0x12], eax
mov dword [esp + 0x16], eax
mov dword [esp + 0x1a], eax
mov word [esp + 0x1e], ax
mov byte [esp + 0x20], al
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov word [esp + 0x3d], ax
mov byte [esp + 0x3f], al
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [esp + 0x1c]
movzx edx, word [esp + 0x1a]
movzx eax, word [esp + 0x18]
push ecx
movzx ecx, word [esp + 0x1a]
push edx
movzx edx, word [esp + 0x1a]
push eax
movzx eax, word [esp + 0x1c]
push ecx
push edx
push eax
push str._d__2d__2d__2d:_2d:_2d
lea ecx, [esp + 0x3c]
push 0x20
push ecx
call fcn.0041af4d
lea eax, [esp + 0x44]
add esp, 0x24
lea edx, [eax + 1]
jmp 0x40a1a0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a1a0
sub eax, edx
mov edx, dword [esp + 0xc]
push edx
push 1
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.0041c9b0
mov edx, dword [esp + 0x15c]
lea ecx, [esp + 0x160]
push ecx
push edx
call fcn.0041ca92
mov esi, eax
add esi, 1
add esp, 0x18
cmp esi, 0x100
jg 0x40a21e
mov ecx, dword [esp + 0x14c]
lea eax, [esp + 0x150]
push eax
push ecx
lea edx, [esp + 0x48]
push 0x100
push edx
call fcn.0041b615
lea eax, [esp + 0x50]
add esp, 0x10
lea edx, [eax + 1]
jmp 0x40a210
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a210
jmp 0x40a2b9
cmp esi, 0x400
jge 0x40a291
push esi
call fcn.0041ae22
mov edi, eax
add esp, 4
test edi, edi
je 0x40a284
push esi
push 0
push edi
call fcn.00420f50
mov ecx, dword [esp + 0x158]
lea eax, [esp + 0x15c]
push eax
push ecx
push esi
push edi
call fcn.0041b615
mov eax, edi
add esp, 0x1c
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a260
sub eax, edx
mov edx, dword [esp + 0xc]
push edx
push 1
push eax
push edi
call fcn.0041c9b0
push edi
call fcn.0041b96e
add esp, 0x14
jmp 0x40a2d0
push str.writelog_exception:_out_of_memory.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x40a2d0
push str.writelog_exception:_buffer_too_small.
lea eax, [esp + 0x44]
push 0x100
push eax
call fcn.0041aff9
lea eax, [esp + 0x4c]
add esp, 0xc
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40a2b0
mov ecx, dword [esp + 0xc]
push ecx
sub eax, edx
push 1
push eax
lea edx, [esp + 0x4c]
push edx
call fcn.0041c9b0
add esp, 0x10
mov eax, dword [esp + 0xc]
push eax
push 1
push 2
push 0x42f408
call fcn.0041c9b0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041c32e
add esp, 0x14
mov ecx, dword [esp + 0x144]
pop edi
pop esi
xor ecx, esp
call fcn.0041aec3
add esp, 0x140
ret