Function at 0x403360
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4048f7
mov eax, dword fs:[0]
push eax
sub esp, 0x47c
mov eax, dword [0x407018]
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 eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403393
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x484]
call fcn.00402f30
add esp, 8
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [0x407060], edi
jne 0x4035b9
push 0x208
lea ecx, [ebp - 0x41e]
xor eax, eax
push edi
push ecx
mov word [ebp - 0x420], ax
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x104
lea edx, [ebp - 0x420]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov word [ebp - 0x43c], ax
lea eax, [ebp - 0x420]
mov dword [ebp - 0x428], 7
mov dword [ebp - 0x42c], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x403416
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x420]
lea ecx, [ebp - 0x43c]
call fcn.00402a80
lea ecx, [ebp - 0x43c]
push ecx
lea ebx, [ebp - 0x468]
mov byte [ebp - 4], 1
call fcn.004031c0
add esp, 4
mov edi, eax
lea esi, [ebp - 0x43c]
mov byte [ebp - 4], 2
call fcn.004037e0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x454], 8
jb 0x40347e
mov edx, dword [ebp - 0x468]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea eax, [ebp - 0x43c]
push eax
lea ebx, [ebp - 0x468]
call fcn.004031c0
add esp, 4
mov edi, eax
lea esi, [ebp - 0x43c]
mov byte [ebp - 4], 3
call fcn.004037e0
mov esi, 8
mov byte [ebp - 4], 1
cmp dword [ebp - 0x454], esi
jb 0x4034c5
mov ecx, dword [ebp - 0x468]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
push 0xe
mov eax, 0x4057f4
lea ecx, [ebp - 0x43c]
call fcn.004029a0
mov eax, dword [ebp - 0x43c]
cmp dword [ebp - 0x428], esi
jae 0x4034eb
lea eax, [ebp - 0x43c]
mov edx, dword [ebp - 0x42c]
lea ecx, [edx + edx]
push ecx
push eax
lea ecx, [ebp - 0x468]
call fcn.00402f30
add esp, 8
mov esi, eax
mov edi, 0x10
cmp esi, 0x407050
je 0x403581
cmp dword [0x407064], edi
jb 0x40352b
mov edx, dword [0x407050]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ebx, ebx
mov dword [0x407064], 0xf
mov dword [0x407060], ebx
mov byte [0x407050], bl
cmp dword [esi + 0x14], edi
jae 0x40355e
mov eax, dword [esi + 0x10]
inc eax
push eax
push esi
push 0x407050
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
jmp 0x403567
mov eax, dword [esi]
mov dword [0x407050], eax
mov dword [esi], ebx
mov ecx, dword [esi + 0x10]
mov dword [0x407060], ecx
mov edx, dword [esi + 0x14]
mov dword [0x407064], edx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
jmp 0x403583
xor ebx, ebx
cmp dword [ebp - 0x454], edi
jb 0x40359b
mov eax, dword [ebp - 0x468]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp - 0x428], 8
jb 0x4035b7
mov ecx, dword [ebp - 0x43c]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor edi, edi
lea edx, [ebp - 0x44c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0x1ff
lea eax, [ebp - 0x20f]
push edi
push eax
mov byte [ebp - 0x210], 0
call sub.MSVCR100.dll_memset
movzx ecx, word [ebp - 0x43e]
movzx edx, word [ebp - 0x440]
movzx eax, word [ebp - 0x442]
push ecx
movzx ecx, word [ebp - 0x444]
push edx
movzx edx, word [ebp - 0x446]
push eax
movzx eax, word [ebp - 0x44a]
push ecx
movzx ecx, word [ebp - 0x44c]
push edx
push eax
push ecx
lea edx, [ebp - 0x210]
push str._4d__02d__02d__02d:_02d:_02d:_d
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
mov eax, dword [0x407050]
add esp, 0x30
cmp dword [0x407064], 0x10
mov dword [ebp - 0x488], edi
jae 0x403645
mov eax, 0x407050
push 0x405838
push eax
lea eax, [ebp - 0x488]
push eax
call dword [sym.imp.MSVCR100.dll_fopen_s]
mov esi, dword [ebp - 0x488]
add esp, 0xc
cmp esi, edi
je 0x40373c
lea eax, [ebp - 0x210]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403672
mov ebx, dword [sym.imp.MSVCR100.dll_fwrite]
push esi
sub eax, edx
push eax
lea ecx, [ebp - 0x210]
push 1
push ecx
call ebx
mov eax, dword [ebp - 0x484]
add esp, 0x10
cmp dword [ebp - 0x470], 0x10
jae 0x4036a6
lea eax, [ebp - 0x484]
mov edx, dword [ebp - 0x488]
mov ecx, dword [ebp - 0x474]
push edx
push ecx
push 1
push eax
call ebx
mov dword [ebp - 0x42c], edi
add esp, 0x10
mov edi, 2
mov eax, 0x40583c
lea esi, [ebp - 0x43c]
mov dword [ebp - 0x428], 0xf
mov byte [ebp - 0x43c], 0
call fcn.004039b0
mov eax, dword [ebp - 0x43c]
mov esi, 0x10
cmp dword [ebp - 0x428], esi
jae 0x403701
lea eax, [ebp - 0x43c]
mov edx, dword [ebp - 0x488]
mov ecx, dword [ebp - 0x42c]
push edx
push ecx
push 1
push eax
call ebx
mov edx, dword [ebp - 0x488]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 0x14
cmp dword [ebp - 0x428], esi
jb 0x40373c
mov eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp dword [ebp - 0x470], 0x10
jb 0x403755
mov ecx, dword [ebp - 0x484]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
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.00403d9c
mov esp, ebp
pop ebp
ret