Function at 0x4183ac
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xea8
push ebx
push edi
push esi
mov dword [ebp - 0xc80], 0
mov eax, dword [ebp + 8]
cmp eax, 1
je 0x4183d9
cmp eax, 2
je 0x4183fd
cmp eax, 3
je 0x418421
jmp 0x41861e
movzx ebx, byte [0x426792]
mov dword [ebp - 0xea8], 0x426794
movzx eax, byte [0x41f4e7]
mov dword [ebp - 0xea0], 0x41f05c
jmp 0x418443
movzx ebx, byte [0x42716e]
mov dword [ebp - 0xea8], 0x427170
movzx eax, byte [0x41f4e8]
mov dword [ebp - 0xea0], 0x41f05d
jmp 0x418443
movzx ebx, byte [0x427b4a]
mov dword [ebp - 0xea8], 0x427b4c
movzx eax, byte [0x41f4e9]
mov dword [ebp - 0xea0], 0x41f05e
mov dword [ebp - 0xea4], eax
test ebx, ebx
je 0x41861e
lea esi, [ebp - 0xe9c]
push esi
call dword [sym.imp.KERNEL32.DLL_GetLocalTime]
cmp dword [ebp + 0x14], 3
je 0x4184ff
cmp dword [ebp + 0x14], 1
je 0x41849a
cmp dword [ebp + 0x14], 4
je 0x418490
cmp dword [ebp + 0x14], 2
je 0x41847f
jmp 0x41861e
cmp bl, 3
je 0x41849a
cmp dword [ebp + 0x10], 0
je 0x41861e
jmp 0x41849a
cmp bl, 3
je 0x4184ff
jmp 0x41861e
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4184ff
mov ebx, esp
push eax
call fcn.004186de
lea edx, [0x41864d]
test eax, eax
je 0x4184ba
lea edx, [0x418678]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
lea esi, [ebp - 0xe9c]
movzx ecx, word [esi + 0xe]
push ecx
movzx ecx, word [esi + 0xc]
push ecx
movzx ecx, word [esi + 0xa]
push ecx
movzx ecx, word [esi + 8]
push ecx
movzx ecx, word [esi + 6]
push ecx
movzx ecx, word [esi + 2]
push ecx
movzx ecx, word [esi]
push ecx
lea edi, [ebp - 0xc80]
push edx
push 0xc80
push edi
call dword [sym.imp.SHLWAPI.DLL_wnsprintfA]
mov esp, ebx
jmp 0x41853f
mov ebx, esp
push dword [ebp + 0xc]
movzx ecx, word [esi + 0xe]
push ecx
movzx ecx, word [esi + 0xc]
push ecx
movzx ecx, word [esi + 0xa]
push ecx
movzx ecx, word [esi + 8]
push ecx
movzx ecx, word [esi + 6]
push ecx
movzx ecx, word [esi + 2]
push ecx
movzx ecx, word [esi]
push ecx
lea edi, [ebp - 0xc80]
push 0x418625
push 0xc80
push edi
call dword [sym.imp.SHLWAPI.DLL_wnsprintfA]
mov esp, ebx
lea edi, [ebp - 0xc80]
push edi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
cmp eax, 0xa
jl 0x41861e
mov esi, eax
cmp dword [ebp - 0xea4], 0
je 0x41858a
lea eax, [ebp - 0xe88]
lea edx, [ebp - 0xe9c]
push edx
push 0x104
push eax
push dword [ebp - 0xea8]
call fcn.00415459
lea eax, [ebp - 0xe88]
mov dword [ebp - 0xea8], eax
push 0
push 0x20
push 4
push 0
push 7
push 0x40000000
push dword [ebp - 0xea8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
jne 0x4185cf
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [ebp - 0xea0]
push 0x1010
push dword [ebp - 0xea8]
push dword [0x4315d0]
push eax
call fcn.0040ab8f
jmp 0x41861e
mov ebx, eax
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
lea ecx, [ebp - 0xe8c]
push 0
push ecx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x418617
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [ebp - 0xea0]
push 0x1010
push dword [ebp - 0xea8]
push dword [0x4315d0]
push eax
call fcn.0040ab8f
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret 0x10