Function at 0x403610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1450
call fcn.00409900
mov eax, dword [0x40f350]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push 0x41f
lea eax, [ebp - 0x423]
push 0
push eax
mov dword [ebp - 0x1450], esi
mov dword [ebp - 0x1438], ebx
mov byte [ebp - 0x424], 0
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x1434], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x143c], eax
test esi, esi
je 0x403677
cmp esi, 0xffffffff
jne 0x40367d
mov esi, dword [0x411414]
test esi, esi
je 0x403686
cmp esi, 0xffffffff
jne 0x4036a2
push 0xfffffffffffffff4
mov esi, 0x40d060
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x40d060], eax
mov dword [ebp - 0x1434], 0
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [esi + 4]
jae 0x4036bc
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004098ea
mov esp, ebp
pop ebp
ret
push edi
test ebx, ebx
je 0x403700
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + ebx - 1]
mov dword [ebp - 0x1428], edi
cmp edi, ebx
je 0x403710
mov al, byte [edi]
cmp al, 0x5c
je 0x4036ed
cmp al, 0x2f
je 0x4036ed
dec edi
cmp edi, ebx
jne 0x4036d6
mov dword [ebp - 0x1428], edi
jmp 0x403710
mov dword [ebp - 0x1428], edi
cmp edi, ebx
je 0x403710
inc edi
mov dword [ebp - 0x1428], edi
jmp 0x403710
mov dword [ebp - 0x1428], 0x40b44a
mov edi, dword [ebp - 0x1428]
mov eax, dword [ebp + 0x1c]
lea edx, [ebp - 0x424]
test eax, eax
jne 0x403772
mov eax, dword [ebp - 0x143c]
test eax, eax
jne 0x403755
push str.Unknown_error_code
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp dword [ebp + 0xc], 3
jne 0x40377e
mov eax, dword [ebp + 0x18]
push eax
push edi
lea ecx, [ebp - 0x412]
push str._occured_in___s:_d_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40377e
push 0
push 0x3e8
push edx
push 0x400
push eax
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
jmp 0x40377e
lea ecx, [ebp + 0x20]
push ecx
push eax
push edx
call dword [sym.imp.USER32.dll_wvsprintfA]
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
mov dword [ebp - 0x142c], edi
test edi, edi
jle 0x4039bc
cmp byte [ebp + edi - 0x425], 0xa
jne 0x4037b4
dec edi
mov dword [ebp - 0x142c], edi
mov byte [ebp + edi - 0x424], 0
test edi, edi
jle 0x4037d1
cmp byte [ebp + edi - 0x425], 0xd
jne 0x4037d1
dec edi
mov dword [ebp - 0x142c], edi
mov byte [ebp + edi - 0x424], 0
mov eax, dword [esi]
test eax, eax
je 0x4039bc
cmp eax, 0xffffffff
je 0x4039bc
lea ecx, [ebp - 0x144c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
cmp dword [esi + 8], 0
je 0x403817
lea edi, [ebp - 0x144c]
call fcn.00403540
test eax, eax
jne 0x403817
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004098ea
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1434], 0
je 0x403875
mov edx, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_LockFile]
xor edi, edi
push edi
push 0x200
push edi
push edi
push edx
call ebx
test eax, eax
jne 0x403866
lea esp, [esp]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, edi
inc edi
cmp eax, 0x3e8
ja 0x403866
mov ecx, dword [esi]
push 0
push 0x200
push 0
push 0
push ecx
call ebx
test eax, eax
je 0x403840
mov edx, dword [esi]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp + 0x10], 0
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4038e9
movzx eax, word [ebp - 0x1440]
movzx ecx, word [ebp - 0x1442]
movzx edx, word [ebp - 0x1444]
push eax
movzx eax, word [ebp - 0x1446]
push ecx
movzx ecx, word [ebp - 0x144a]
push edx
movzx edx, word [ebp - 0x144c]
push eax
push ecx
push edx
lea eax, [ebp - 0x1424]
push str.__d__02d__02d__02d:_02d:_02d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
push 0
lea ecx, [ebp - 0x1430]
push ecx
lea edx, [ebp - 0x1424]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esi]
push eax
lea eax, [ebp - 0x1424]
push eax
push ecx
call edi
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx*4 + 0x40d048]
mov eax, ecx
lea ebx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4038f8
push 0
lea edx, [ebp - 0x1430]
push edx
sub eax, ebx
push eax
mov eax, dword [esi]
push ecx
push eax
call edi
mov eax, dword [ebp - 0x1428]
test eax, eax
je 0x40395e
cmp dword [esi + 4], 0
jne 0x40395e
mov ecx, dword [ebp + 0x18]
push ecx
push eax
lea edx, [ebp - 0x1424]
push str.__10s:__4d_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
lea eax, [ebp - 0x1430]
push eax
lea ecx, [ebp - 0x1424]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [esi]
lea edx, [ebp - 0x1424]
push edx
push eax
call edi
mov eax, dword [ebp - 0x142c]
test eax, eax
je 0x40397e
push 0
lea ecx, [ebp - 0x1430]
push ecx
push eax
mov eax, dword [esi]
lea edx, [ebp - 0x424]
push edx
push eax
call edi
mov edx, dword [esi]
push 0
lea ecx, [ebp - 0x1430]
push ecx
push 2
push 0x40b534
push edx
call edi
cmp dword [ebp - 0x1434], 0
je 0x4039b0
mov eax, dword [esi]
push 0
push 0x200
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov ebx, dword [ebp - 0x1438]
mov edi, dword [ebp - 0x142c]
mov esi, dword [ebp - 0x143c]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp + 0x1c], 0
je 0x4039f5
test esi, esi
je 0x4039f5
cmp dword [ebp + 0xc], 3
jne 0x4039f5
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x1450]
push 0
push ecx
push ebx
push edx
push 3
push eax
call fcn.00403610
add esp, 0x18
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004098ea
mov esp, ebp
pop ebp
ret