Function at 0x409720
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xc98
mov eax, dword [0x61308c]
xor eax, esp
mov dword [esp + 0xc94], eax
mov ecx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x18], esi
push edi
test ecx, ecx
je 0x409b4d
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409751
sub ecx, edx
je 0x409b4d
mov ecx, esi
call fcn.00409670
cmp byte [ebp + 0x18], 0
jne 0x409775
test eax, eax
je 0x409b4d
xor eax, eax
xorps xmm0, xmm0
mov word [esp + 0x20], ax
mov dword [esp + 0x2a], eax
mov word [esp + 0x2e], ax
lea eax, [esp + 0x20]
push eax
movq qword [esp + 0x26], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [ebp + 0x14]
xorps xmm0, xmm0
movups xmmword [esp + 0x31], xmm0
mov edi, esi
mov dword [esp + 0x49], 0
movq qword [esp + 0x41], xmm0
xor ecx, ecx
movaps xmm0, xmmword [0x5dd510]
mov byte [esp + 0x30], 0
mov word [esp + 0x4d], 0
lea edx, [edi + 1]
mov byte [esp + 0x4f], 0
movaps xmmword [esp + 0x30], xmm0
movq qword [esp + 0x40], xmm0
mov dword [esp + 0x48], 0x20202020
mov word [esp + 0x4c], 0x2020
nop dword [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x4097f0
sub edi, edx
mov dword [esp + 0x14], 0x1e
mov dword [esp + 0x10], edi
lea edx, [esp + 0x4d]
add esi, edi
lea eax, [edi + 1]
mov dword [esp + 0xc], eax
mov edi, eax
cmp edi, 0x1e
mov eax, edi
cmova eax, dword [esp + 0x14]
cmp ecx, eax
jae 0x40982b
mov al, byte [esi]
inc ecx
mov byte [edx], al
dec esi
dec edx
jmp 0x409814
mov edi, dword [esp + 0x10]
cmp ecx, 0x1d
jae 0x40983d
lea eax, [esp + 0x4d]
sub eax, ecx
mov byte [eax], 0x7c
mov edx, dword [ebp + 0x10]
inc ecx
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x409844
sub edx, esi
lea esi, [esp + 0x4d]
sub esi, ecx
lea eax, [edx + 1]
sub edx, ecx
add edx, edi
mov dword [esp + 0xc], eax
mov edi, dword [ebp + 0x10]
inc edi
add edx, edi
mov edi, 0x1e
nop dword [eax]
cmp dword [esp + 0xc], edi
cmova eax, edi
cmp ecx, eax
jae 0x409888
mov al, byte [edx]
inc ecx
mov byte [esi], al
dec edx
mov eax, dword [esp + 0xc]
dec esi
jmp 0x409870
push 0x200
lea eax, [esp + 0x54]
push 0
push eax
call fcn.0052d340
mov esi, dword [ebp + 0x1c]
add esp, 0xc
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4098a4
sub ecx, edx
cmp ecx, 0x200
jb 0x4098d1
push str.The_format_string_is_too_long.
lea eax, [esp + 0x54]
push 0x200
push eax
call fcn.00535383
add esp, 0xc
jmp 0x409a67
call fcn.00405c00
mov edi, eax
lea eax, [ebp + 0x20]
push eax
push 0
push esi
push 0xffffffffffffffff
push 0x200
lea eax, [esp + 0x64]
mov dword [esp + 0x24], edi
push eax
push dword [edi + 4]
push dword [edi]
call fcn.00533536
or ecx, 0xffffffff
add esp, 0x20
test eax, eax
cmovs eax, ecx
test eax, eax
jle 0x40991f
lea ecx, [esp + 0x50]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409910
sub ecx, edx
jne 0x409a67
push 0x400
lea eax, [esp + 0x49c]
push 0
push eax
call fcn.0052d340
add esp, 0xc
lea eax, [esp + 0x898]
push 0x400
push 0
push eax
call fcn.0052d340
mov edx, dword [ebp + 0x1c]
add esp, 0xc
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409955
push 0x200
lea eax, [esp + 0x49c]
sub ecx, esi
push eax
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [esp + 0x498]
xor edx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409983
sub ecx, esi
sar ecx, 1
lea eax, [ecx - 1]
test eax, eax
je 0x4099f2
mov eax, 0x25
lea ecx, [eax + 0x2e]
lea edi, [eax + 0x4e]
cmp ax, word [esp + edx*2 + 0x498]
jne 0x4099c0
cmp cx, word [esp + edx*2 + 0x49a]
jne 0x4099c0
mov word [esp + edx*2 + 0x49a], di
lea ecx, [esp + 0x498]
inc edx
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4099d0
sub ecx, esi
sar ecx, 1
lea eax, [ecx - 1]
cmp edx, eax
mov eax, 0x25
lea ecx, [eax + 0x2e]
jb 0x4099a4
mov edi, dword [esp + 0x10]
lea eax, [ebp + 0x20]
push eax
push 0
lea eax, [esp + 0x4a0]
push eax
push 0xffffffffffffffff
push 0x200
lea eax, [esp + 0x8ac]
push eax
push dword [edi + 4]
push dword [edi]
call fcn.0053355d
push 0x200
lea eax, [esp + 0x74]
push 0
push eax
call fcn.0052d340
lea ecx, [esp + 0x8c4]
add esp, 0x2c
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409a37
push 0
push 0
push 0x200
sub ecx, edx
lea eax, [esp + 0x5c]
push eax
sar ecx, 1
lea eax, [esp + 0x8a8]
push ecx
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x246
lea eax, [esp + 0x254]
push 0
push eax
call fcn.0052d340
add esp, 0xc
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [ebp + 0xc]
movzx eax, word [esp + 0x40]
push eax
movzx eax, word [esp + 0x42]
push eax
movzx eax, word [esp + 0x44]
push eax
movzx eax, word [esp + 0x46]
push eax
movzx eax, word [esp + 0x46]
push eax
movzx eax, word [esp + 0x48]
push eax
push str.__4d__2d__2d__2d:_2d:_2d___4d___s______d:_d__s_r_n
push 0xffffffffffffffff
lea eax, [esp + 0x284]
push 0x246
push eax
call fcn.00409ca0
add esp, 0x3c
cmp byte [ebp + 0x18], 0
je 0x409aef
lea eax, [esp + 0x250]
push eax
call fcn.00409c60
add esp, 4
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
lea esi, [edi + 0x10c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x108], 0xffffffff
je 0x409b46
lea ecx, [esp + 0x250]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409b20
push 0
lea eax, [esp + 0x1c]
sub ecx, edx
push eax
push ecx
lea eax, [esp + 0x25c]
push eax
mov eax, dword [edi + 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xc9c]
pop edi
pop esi
xor ecx, esp
call fcn.005120a1
mov esp, ebp
pop ebp
ret