Function at 0x40246c
Capabilities:
Create thread
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x378
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
mov esi, ecx
mov dword [ebp - 4], ebx
je 0x4025f0
push edi
mov dword [esi + 8], eax
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
lea ecx, [esi + 0x10]
mov dword [esi + 0xc], eax
call fcn.00403a7b
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x173]
mov byte [ebp - 0x174], bl
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x273]
mov byte [ebp - 0x274], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x274]
push 0x100
push eax
push 2
push dword [0x416f0c]
mov edi, 0x104
mov ecx, esi
mov dword [ebp + 0x10], edi
call fcn.00402cb9
mov ecx, dword [esi + 8]
lea edx, [ebp + 0x10]
push edx
lea edx, [ebp - 0x174]
mov eax, dword [ecx]
push edx
call dword [eax + 0x10]
test eax, eax
jge 0x402517
lea eax, [ebp - 0x174]
push 0x415ee0
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
pop ecx
lea eax, [ebp + 0xc]
push eax
push 5
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x402568
lea eax, [ebp - 0x378]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x402549
lea eax, [ebp - 0x378]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp + 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push 0x4c
lea eax, [ebp - 0x70]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [esi + 0xc]
add esp, 0xc
mov dword [ebp - 0x6c], eax
mov eax, dword [0x416f0c]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x274]
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x174]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x70]
push eax
mov dword [ebp - 0x70], 0x4c
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x3c], 0x806
mov dword [ebp - 0x34], 0x41513c
call sub.comdlg32.dll_GetSaveFileNameA
test eax, eax
pop edi
je 0x402657
lea eax, [esi + 0x34]
lea ecx, [esi + 0x38]
push eax
mov byte [eax], bl
call fcn.0040ef43
test al, al
je 0x4025f0
lea eax, [ebp - 8]
push eax
push ebx
push esi
push 0x403993
push ebx
push ebx
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
cmp eax, ebx
mov dword [ebp + 8], eax
jne 0x4025f4
xor eax, eax
jmp 0x40265a
push dword [ebp - 0x54]
mov ecx, esi
call fcn.00402660
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov dword [ebp - 4], eax
push 4
push 0xff
lea eax, [ebp + 8]
push 0xffffffffffffffff
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
sub eax, ebx
je 0x40264e
dec eax
jne 0x40264e
push 1
push ebx
push ebx
lea eax, [ebp - 0x24]
push ebx
push eax
call esi
test eax, eax
je 0x402607
cmp dword [ebp - 0x20], 0x12
je 0x40264e
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x402623
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 0xc