Function at 0x409640
Capabilities:
Create directory
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43ebbf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb00
push ebx
push esi
xor ebx, ebx
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], ebx
call fcn.0040154a
lea esi, [esp + 0x38]
mov dword [esp + 0xb14], ebx
call fcn.0040a046
lea eax, [esp + 0x6c]
push eax
mov byte [esp + 0xb18], 1
call fcn.0040a7cd
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], ebx
call fcn.0040154a
mov eax, dword [ebp + 8]
mov byte [esp + 0xb14], 3
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4096b0
sub eax, ecx
sar eax, 1
lea ecx, [eax + 1]
mov eax, 0x400
cmp ecx, eax
jae 0x4096e5
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4096d1
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
jmp 0x4096e7
mov edi, eax
lea eax, [esp + 0x94]
call fcn.00405f16
lea ecx, [esp + 0x24]
call fcn.0040154a
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [esp + 0x34]
push eax
push 5
mov byte [esp + 0xb20], 5
call fcn.0041b9f0
mov ecx, dword [ebp + 0x10]
cmp ecx, ebx
je 0x409725
mov eax, dword [ecx]
push ebx
push dword [esp + 0x34]
call dword [eax + 8]
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [esp + 0x1c]
push eax
push 0x2f
call fcn.0041c783
push str.attachment__filename__.__
lea eax, [esp + 0x3c]
call fcn.0040a062
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00403875
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040a145
test eax, eax
jne 0x40979b
mov ecx, dword [ebp + 0xc]
push ebx
lea eax, [esp + 0x1c]
push eax
push 1
call fcn.0041c783
push str.name__.__
lea eax, [esp + 0x3c]
call fcn.0040a062
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x1c]
call fcn.00403875
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040a145
test eax, eax
je 0x4097c7
lea edi, [esp + 0x10]
lea ebx, [esp + 0x20]
lea eax, [esp + 0x6c]
call fcn.0040a799
push dword [esp + 0x20]
lea ecx, [esp + 0x1c]
call fcn.00401b20
lea esi, [esp + 0x18]
call fcn.004095dc
jmp 0x4098dc
push edi
call fcn.0040fc80
mov esi, eax
mov eax, dword [ebp + 8]
pop ecx
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4097d6
sub eax, ecx
sar eax, 1
inc eax
push eax
push dword [ebp + 8]
lea eax, [esp + 0x3c]
push edi
push esi
push eax
call fcn.0042a15c
add esp, 0x14
push esi
lea eax, [esp + 0xc4]
call fcn.00405f3d
lea eax, [esp + 0xc0]
push eax
lea eax, [esp + 0xe0]
push eax
mov byte [esp + 0xb1c], 6
call fcn.0040c7e0
pop ecx
pop ecx
lea ebx, [esp + 0x94]
mov byte [esp + 0xb14], 7
call fcn.0040a032
lea edi, [esp + 0xdc]
mov byte [esp + 0xb14], 6
call fcn.00405f6f
lea edi, [esp + 0xc0]
mov byte [esp + 0xb14], 5
call fcn.00405f6f
mov eax, ebx
call fcn.00405fd7
push eax
lea ecx, [esp + 0x18]
call fcn.00404da8
push esi
mov byte [esp + 0xb18], 8
call fcn.0040fc8b
lea eax, [esp + 0x3c]
mov dword [esp], str._____
call fcn.0040a062
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x18]
call fcn.00403875
push eax
lea eax, [esp + 0x40]
push eax
call fcn.0040a145
test eax, eax
je 0x4098cb
lea edi, [esp + 0x10]
lea ebx, [esp + 0x20]
lea eax, [esp + 0x6c]
call fcn.0040a799
push dword [esp + 0x20]
lea ecx, [esp + 0x1c]
call fcn.00401b20
lea ecx, [esp + 0x14]
mov byte [esp + 0xb14], 5
call fcn.004015ab
lea ecx, [esp + 0x18]
call fcn.00401529
test al, al
je 0x409930
push 0x118
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 9
test eax, eax
je 0x409913
push 0x87
push 1
mov ecx, eax
call fcn.00404cfb
jmp 0x409915
xor eax, eax
mov byte [esp + 0xb14], 5
mov dword [esp + 0x14], eax
push 0x44dd1c
lea eax, [esp + 0x18]
push eax
call fcn.0042b70d
lea eax, [esp + 0xf8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x40999f
push 0x14
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 0xa
test eax, eax
je 0x409986
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x4475ae
call fcn.00404da8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x91
push dword [esp + 0x20]
call fcn.00404afd
jmp 0x409988
xor eax, eax
mov byte [esp + 0xb14], 5
mov dword [esp + 0x10], eax
push 0x44dd0c
lea eax, [esp + 0x14]
jmp 0x40992a
lea eax, [esp + 0xb0]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov esi, eax
test esi, esi
je 0x409a08
push 0x14
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 0xb
test eax, eax
je 0x4099ec
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x4475ae
call fcn.00404da8
push esi
push 0x92
push dword [esp + 0x20]
call fcn.00404afd
jmp 0x4099ee
xor eax, eax
mov byte [esp + 0xb14], 5
mov dword [esp + 0x10], eax
push 0x44dd0c
lea eax, [esp + 0x14]
jmp 0x40992a
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0xb4]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringW]
push dword [esp + 0x2c]
lea eax, [esp + 0xfc]
push eax
lea eax, [esp + 0x2c]
push str._s_s
push eax
call fcn.00403861
add esp, 0x10
lea ecx, [esp + 0x24]
call fcn.00403875
push 0
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x409aae
push 0x14
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 0xc
test eax, eax
je 0x409a92
push ecx
lea eax, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00403545
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x93
push dword [esp + 0x20]
call fcn.00404afd
jmp 0x409a94
xor eax, eax
mov byte [esp + 0xb14], 5
mov dword [esp + 0x10], eax
push 0x44dd0c
lea eax, [esp + 0x14]
jmp 0x40992a
push dword [esp + 0x18]
lea eax, [esp + 0xfc]
push dword [esp + 0x30]
push eax
lea eax, [esp + 0x34]
push str._s_s_s
push eax
call fcn.00403861
add esp, 0x14
lea ecx, [esp + 0x28]
call fcn.00403875
push 0x9001
push eax
lea ecx, [esp + 0x60]
mov dword [esp + 0x1c], eax
call fcn.0042013a
mov esi, dword [ebp + 0xc]
mov byte [esp + 0xb14], 0xd
mov edi, 0x800
jmp 0x409b72
push ebx
lea eax, [esp + 0x304]
push eax
lea ecx, [esp + 0x60]
call fcn.0041f73a
mov eax, dword [ebp + 0x10]
add dword [esp + 0x1c], ebx
test eax, eax
je 0x409b72
mov ecx, dword [esp + 0x1c]
fild dword [esp + 0x1c]
test ecx, ecx
jns 0x409b2d
fadd dword [0x448d50]
mov ecx, dword [esp + 0x30]
fmul qword [0x448d48]
fild dword [esp + 0x30]
test ecx, ecx
jns 0x409b45
fadd dword [0x448d50]
fdivp st(1)
mov ebx, dword [eax]
push 0x3e8
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fadd qword [0x448d40]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
call fcn.0042d596
mov ecx, dword [ebp + 0x10]
movzx eax, ax
push eax
call dword [ebx]
mov eax, dword [esi]
push edi
lea ecx, [esp + 0x304]
push ecx
mov ecx, esi
call dword [eax + 0x38]
mov ebx, eax
test ebx, ebx
jne 0x409afe
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 4
push eax
push dword [esp + 0x1c]
call edi
test eax, eax
jne 0x409bfa
push 0x14
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 0xe
test eax, eax
je 0x409bde
push ecx
lea eax, [esp + 0x2c]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00403545
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x94
push dword [esp + 0x20]
call fcn.00404afd
jmp 0x409be0
xor eax, eax
mov byte [esp + 0xb14], 0xd
mov dword [esp + 0x10], eax
push 0x44dd0c
lea eax, [esp + 0x14]
jmp 0x40992a
push 4
push 0
push dword [esp + 0x28]
call edi
test eax, eax
jne 0x409c63
push 0x14
call fcn.00401582
mov dword [esp + 0x14], eax
mov byte [esp + 0xb14], 0xf
test eax, eax
je 0x409c47
push ecx
lea eax, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call fcn.00403545
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x94
push dword [esp + 0x20]
call fcn.00404afd
jmp 0x409c49
xor eax, eax
mov byte [esp + 0xb14], 0xd
mov dword [esp + 0x10], eax
push 0x44dd0c
lea eax, [esp + 0x14]
jmp 0x40992a
lea ecx, [esp + 0x58]
call fcn.0041f99e
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x409c7c
push dword [esp + 0x14]
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [esp + 0x58]
mov byte [esp + 0xb14], 5
call fcn.0041fb40
lea ecx, [esp + 0x24]
call fcn.004015ab
lea edi, [esp + 0x94]
mov byte [esp + 0xb14], 3
call fcn.00405f6f
lea ecx, [esp + 0x28]
call fcn.004015ab
lea edi, [esp + 0x6c]
call fcn.004095c1
lea eax, [esp + 0x38]
call fcn.004095b9
lea ecx, [esp + 0x18]
call fcn.004015ab
mov ecx, dword [esp + 0xb0c]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc