Function at 0x4026ad
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov dword [ebp - 0x104], 0
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 1
jne 0x4026ed
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x70
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 2
jne 0x40271a
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x6f
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 3
jne 0x402747
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x72
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 4
jne 0x402774
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x71
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 5
jne 0x40279e
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x75
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 6
jne 0x4027c8
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x74
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
mov eax, dword [ebp + 8]
and eax, 0xff
cmp eax, 7
jne 0x4027f2
push 0x100
lea ecx, [ebp - 0x100]
push ecx
push 0x6e
mov edx, dword [0x413d14]
push edx
call dword [sym.imp.USER32.dll_LoadStringA]
jmp 0x4027f7
jmp 0x402a82
push 0x100
lea eax, [ebp - 0x3cc]
push eax
push 0x76
mov ecx, dword [0x413d14]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
cmp dword [ebp + 0xc], 0
je 0x402864
push 0x64
lea edx, [ebp - 0x2cc]
push edx
push 0x77
mov eax, dword [0x413d14]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [ebp - 0x2cc]
push ecx
lea edx, [ebp - 0x3cc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x3cc]
push edx
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x40287f
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x3cc]
push edx
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x204]
push ecx
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x104]
push eax
call fcn.00401058
add esp, 4
test eax, eax
je 0x402a49
cmp dword [ebp - 0x104], 0
je 0x402a49
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x830]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [ebp - 0x824]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x826]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x828]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x82a]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x82e]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x830]
and ecx, 0xffff
push ecx
push str.______04d__02d__02d__02d:_02d:_02d______r_n_r_n
lea edx, [ebp - 0x40c]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
lea eax, [ebp - 0x40c]
push eax
lea ecx, [ebp - 0x714]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [ebp - 0x100]
push edx
lea eax, [ebp - 0x714]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str._r_n_r_n
lea ecx, [ebp - 0x714]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x104
lea edx, [ebp - 0x514]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x718], eax
cmp dword [ebp - 0x718], 0
je 0x402a49
push 0
push 0
push 0
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x514]
push ecx
call fcn.00408fb1
add esp, 0x14
lea edx, [ebp - 0x410]
push edx
lea eax, [ebp - 0x81c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push str.TEDErr.log
lea ecx, [ebp - 0x81c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x81c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x834], eax
cmp dword [ebp - 0x834], 0xffffffff
je 0x402a49
push 2
push 0
push 0
mov eax, dword [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x820]
push ecx
lea edx, [ebp - 0x714]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x714]
push eax
mov ecx, dword [ebp - 0x834]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x834]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x41116c], 0
je 0x402a82
push 0x64
lea eax, [ebp - 0x268]
push eax
push 0x73
mov ecx, dword [0x413d14]
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push 0x10
lea edx, [ebp - 0x268]
push edx
lea eax, [ebp - 0x100]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esp, ebp
pop ebp
ret