Function at 0x4044e0
Capabilities:
Get common file path
Get graphical window text
Set current directory

Disassembly:
sub esp, 0x330
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x23c]
push eax
push 0x103
xor ebx, ebx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esp + 0x23c]
push ecx
lea edx, [esp + 0x38]
push str._s_savedata
push edx
call fcn.00466e90
add esp, 0xc
push 0x103
push 0x4c926c
lea eax, [esp + 0x3c]
push eax
push str.CapFolder
call fcn.0042e090
push eax
call fcn.0042e060
push eax
call fcn.00455b70
add esp, 0x18
call fcn.00452b20
cmp eax, ebx
je 0x4047d5
cmp dword [eax + 0x10], ebx
jne 0x4047d5
cmp byte [0x4c9168], bl
jne 0x40457d
push str.Capture_
push 0x104
push 0x4c9168
push str.CAPTURE_NAME
call fcn.00459c80
add esp, 0x10
call fcn.00411060
cmp eax, 1
jne 0x404602
lea ecx, [esp + 0x20]
push ecx
call fcn.00467064
lea edx, [esp + 0x14]
push edx
mov byte [esp + 0x2a], bl
mov byte [esp + 0x2d], bl
call fcn.00466feb
or ecx, 0xffffffff
xor eax, eax
mov edi, 0x4c9168
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
lea edx, [esp + 0x140]
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1e]
push ecx
lea edx, [esp + 0x1f]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x37]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x42]
mov byte [esp + 0x2e], bl
mov byte [esp + 0x31], bl
mov byte [esp + 0x34], bl
push eax
lea ecx, [esp + 0x158]
jmp 0x40468d
lea eax, [esp + 0x34]
push 0x104
push eax
call fcn.004517c0
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea ecx, [esp + 0x20]
push ecx
call fcn.00467064
lea edx, [esp + 0x14]
push edx
mov byte [esp + 0x2a], bl
mov byte [esp + 0x2d], bl
call fcn.00466feb
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
lea edx, [esp + 0x140]
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1e]
push ecx
lea edx, [esp + 0x1f]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x37]
push ecx
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x42]
mov byte [esp + 0x2e], bl
mov byte [esp + 0x31], bl
mov byte [esp + 0x34], bl
push eax
lea ecx, [esp + 0x158]
push ecx
lea edx, [esp + 0x58]
push 0x4ad34c
push edx
call fcn.00466e90
add esp, 0x2c
mov dword [0x4c9018], 0x4c
call fcn.004517c0
mov dword [0x4c901c], eax
mov dword [0x4c9020], ebx
mov dword [0x4c9024], 0x4ad2d0
mov dword [0x4c9028], ebx
mov dword [0x4c902c], ebx
mov dword [0x4c9030], ebx
mov dword [0x4c9034], ebx
mov dword [0x4c9038], 0x104
mov dword [0x4c903c], ebx
mov dword [0x4c9040], 0xfe
mov dword [0x4c9044], 0x4c926c
mov dword [0x4c9048], ebx
mov dword [0x4c904c], ebx
mov word [0x4c9050], bx
mov word [0x4c9052], bx
mov dword [0x4c9054], 0x4ad348
mov dword [0x4c9058], ebx
mov dword [0x4c905c], ebx
mov dword [0x4c9060], ebx
call fcn.004517c0
mov dword [0x4c901c], eax
lea eax, [esp + 0x34]
mov dword [0x4c9034], eax
mov dword [0x4c903c], ebx
mov dword [0x4c9048], 0x4ad330
mov dword [0x4c904c], 6
call fcn.00459590
call fcn.00451c70
push 0x4c9018
call sub.comdlg32.dll_GetSaveFileNameA
mov ebp, eax
cmp ebp, ebx
mov byte [esp + 0x137], bl
jne 0x40479c
call sub.comdlg32.dll_CommDlgExtendedError
test eax, eax
je 0x4047d5
push 0x4ad324
call fcn.00451d60
add esp, 4
jmp 0x4047d5
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xc0
jb 0x4047c1
push 0x4ad30c
call fcn.00451d60
add esp, 4
jmp 0x4047d5
lea ecx, [esp + 0x34]
push ecx
call fcn.00404370
add esp, 4
mov ebp, eax
neg ebp
sbb ebp, ebp
inc ebp
lea edx, [esp + 0x23c]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call fcn.00459550
call fcn.00426580
cmp ebp, ebx
je 0x4048ad
push ebx
push ebx
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00467772
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
lea edi, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, 0x4c926c
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x138]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, 0x4c926c
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x4c926c
repne scasb al, byte es:[edi]
not ecx
mov al, byte [ecx + 0x4c926a]
dec ecx
cmp al, 0x5c
jne 0x40488f
or ecx, 0xffffffff
mov edi, 0x4c926c
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov byte [ecx + 0x4c926a], bl
push 0x4c926c
push str.CapFolder
call fcn.0042e090
push eax
call fcn.0042e060
push eax
call fcn.00455c60
add esp, 0x10
xor eax, eax
cmp ebp, ebx
setne al
pop edi
pop esi
pop ebp
pop ebx
dec eax
add esp, 0x330
ret