Function at 0x40e410
Capabilities:
Create directory
Write file on windows

Disassembly:
mov eax, 0x4ae4
call fcn.00412110
mov eax, dword [esp + 0x4ae8]
push ebx
push esi
lea ecx, [esp + 0x2b0]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
lea edx, [esp + 0x2b0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea eax, [esp + 0x2b0]
push 0x41c6a4
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
mov edx, dword [esp + 0x4afc]
lea ecx, [esp + 0x2b0]
push ecx
push edx
push 0x41d600
lea eax, [esp + 0x6cc]
push str._s_ld__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea ecx, [esp + 0x30]
lea edx, [esp + 0x8c8]
lea eax, [esp + 0x6c0]
push 0x30000000
push ecx
push edx
push eax
mov dword [esp + 0x40], 0x104
call dword [sym.imp.SHLWAPI.dll_UrlCanonicalizeW]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x8c8]
push ecx
push edx
call fcn.00411ab0
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
mov dword [esp + 0x28], esi
je 0x40e76d
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x4c]
push eax
push esi
push ecx
mov dword [esp + 0x1c], fcn.00415010
mov dword [esp + 0x20], fcn.00415030
mov dword [esp + 0x44], 0x415040
mov dword [esp + 0x48], 0x415060
call fcn.00414e70
lea edx, [esp + 0x50]
push edx
call fcn.00414f00
lea eax, [esp + 0xae0]
push ebx
push eax
call fcn.00414c60
lea edx, [esp + 0xae8]
lea ecx, [esp + 0x5c]
push edx
mov dword [esp + 0xafc], ecx
call fcn.00414e00
add esp, 0x1c
call fcn.00414a40
lea eax, [esp + 0x58]
push eax
call fcn.00412610
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0xad8]
push edx
lea ecx, [esp + 0x64]
push eax
push ecx
call fcn.00412770
add esp, 0x14
test eax, eax
jne 0x40e755
mov eax, dword [esp + 0x74]
push ebp
xor ebp, ebp
cmp eax, ebx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0xc], ebx
mov dword [esp + 0x1c], ebx
jbe 0x40e743
push edi
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x14]
push ebx
lea ecx, [esp + 0x64]
push ebp
push ecx
lea esi, [eax + edx]
call fcn.00412730
lea edx, [eax + eax]
push edx
push ebx
call fcn.00415010
mov edi, eax
add esp, 0x14
cmp edi, ebx
je 0x40e73e
push edi
lea eax, [esp + 0x64]
push ebp
push eax
call fcn.00412730
mov al, byte [esi + 0x19]
add esp, 0xc
cmp al, bl
jne 0x40e719
lea ecx, [esp + 0x40]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x40]
push edx
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
lea edx, [esp + 0xaf4]
push ebp
lea eax, [esp + 0x80]
push edx
push eax
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x64], ebx
call fcn.004147e0
add esp, 0x28
test eax, eax
jne 0x40e73e
lea ecx, [esp + 0x4c0]
push edi
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea edx, [esp + 0x4c0]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov dword [esp + 0x24], 0xa
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [esp + 0x4c0]
push ebx
push eax
call esi
lea ecx, [esp + 0xb0]
push 0x41d19c
push ecx
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
cmp byte [esp + 0x4afc], bl
je 0x40e68c
lea edx, [esp + 0xb0]
push 0x41c6c0
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0xb0]
push ebx
push eax
call esi
lea ecx, [esp + 0xb0]
push edi
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp byte [esp + 0x4afc], bl
je 0x40e6ba
mov eax, dword [esp + 0x4b00]
lea edx, [esp + 0xb0]
push edx
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push ebx
push 0x80
push 2
push ebx
push 1
lea ecx, [esp + 0xc4]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40e6ec
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e70a
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x48]
push ebx
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jne 0x40e641
push edi
push ebx
call fcn.00415030
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x84]
add esp, 8
inc ebp
add ecx, 0x20
cmp ebp, eax
mov dword [esp + 0x14], ecx
jb 0x40e588
mov esi, dword [esp + 0x30]
pop edi
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x14]
push edx
push eax
call dword [esp + 0x20]
add esp, 8
pop ebp
lea ecx, [esp + 0x10]
lea edx, [esp + 0x58]
push ecx
push edx
call fcn.00412640
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0xc
pop esi
pop ebx
add esp, 0x4ae4
ret