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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x4d3100]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea edx, [ebp - 0x218]
mov ecx, str.capture_copyright
xor esi, esi
call fcn.00449ba0
test eax, eax
jne 0x4319c5
lea ecx, [ebp - 0x218]
call fcn.0044a4c0
mov edi, eax
test edi, edi
je 0x4319c5
cmp dword [edi + 0xc], esi
jne 0x4319c5
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x38]
test ecx, ecx
je 0x431990
mov dword [ecx + 0x38], eax
jmp 0x431995
mov dword [0x53c124], eax
mov ecx, dword [edi + 0x38]
test ecx, ecx
je 0x4319a2
mov eax, dword [edi + 0x34]
mov dword [ecx + 0x34], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
push dword [edi + 0x30]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [edi + 0x24]
call fcn.00494034
add esp, 4
push edi
call fcn.00494034
add esp, 4
lea edx, [ebp - 0x218]
mov ecx, str.capture_copyright_
call fcn.00449ba0
test eax, eax
jne 0x431a33
lea ecx, [ebp - 0x218]
call fcn.0044a4c0
mov edi, eax
test edi, edi
je 0x431a33
cmp dword [edi + 0xc], esi
jne 0x431a33
mov ecx, dword [edi + 0x34]
mov eax, dword [edi + 0x38]
test ecx, ecx
je 0x4319fe
mov dword [ecx + 0x38], eax
jmp 0x431a03
mov dword [0x53c124], eax
mov ecx, dword [edi + 0x38]
test ecx, ecx
je 0x431a10
mov eax, dword [edi + 0x34]
mov dword [ecx + 0x34], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
push dword [edi + 0x30]
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [edi + 0x24]
call fcn.00494034
add esp, 4
push edi
call fcn.00494034
add esp, 4
lea eax, [ebp - 0x320]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x110]
push str._s_save_cn
push eax
call fcn.00493964
add esp, 0xc
cmp byte [0x53a358], 0
jne 0x431aa2
mov ecx, str.REG_LOCAL
call fcn.00487da0
mov byte [0x53a358], 0
test eax, eax
je 0x431a83
mov eax, dword [eax + 4]
jmp 0x431a88
mov eax, str.MAJIRO_RUNTIME
push 0x800
push eax
push 0x53a358
call fcn.00495450
add esp, 0xc
mov byte [0x53ab57], 0
cmp byte [0x53ab68], 0
jne 0x431ae4
mov ecx, str.REG_GLOBAL
call fcn.00487da0
mov byte [0x53ab68], 0
test eax, eax
je 0x431ac5
mov eax, dword [eax + 4]
jmp 0x431aca
mov eax, str.MAJIRO_SYSTEM
push 0x800
push eax
push 0x53ab68
call fcn.00495450
add esp, 0xc
mov byte [0x53b367], 0
push 0x103
push 0x4e65e0
lea eax, [ebp - 0x110]
mov edx, 0x53a358
push eax
push str.CapFolder
mov ecx, 0x53ab68
call fcn.0047e280
mov eax, dword [0x57314c]
add esp, 0x10
test eax, eax
je 0x431c4a
cmp dword [eax + 0x10], esi
jne 0x431c4a
cmp byte [0x4e66f0], 0
jne 0x431b64
mov ecx, str.CAPTURE_NAME
call fcn.00487da0
mov byte [0x4e66f0], 0
test eax, eax
je 0x431b45
mov eax, dword [eax + 4]
jmp 0x431b4a
mov eax, str.Capture_
push 0x104
push eax
push 0x4e66f0
call fcn.00495450
add esp, 0xc
mov byte [0x4e67f3], 0
cmp dword [0x4e4e18], 1
jne 0x431b74
mov edx, 0x4e66f0
jmp 0x431b92
push 0x104
lea eax, [ebp - 0x110]
push eax
push dword [0x53bb48]
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea edx, [ebp - 0x110]
lea ecx, [ebp - 0x110]
call fcn.004318a0
call fcn.00431290
mov eax, dword [0x53bb48]
mov dword [0x53c60c], eax
lea eax, [ebp - 0x110]
mov dword [0x53c624], eax
mov dword [0x53c62c], esi
mov dword [0x53c638], 0x4c3e48
mov dword [0x53c63c], 6
call fcn.0047ed50
mov eax, dword [0x53c100]
test eax, eax
je 0x431be1
call eax
push 0x53c608
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
mov esi, eax
mov byte [ebp - 0xd], 0
test esi, esi
jne 0x431c0f
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
je 0x431c4a
push 0x4c3e60
call fcn.00485990
add esp, 4
jmp 0x431c4a
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431c18
sub ecx, edx
cmp ecx, 0xc0
jb 0x431c38
push 0x4c3e6c
call fcn.00485990
add esp, 4
jmp 0x431c4a
lea ecx, [ebp - 0x110]
call fcn.004314b0
mov esi, eax
neg esi
sbb esi, esi
inc esi
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call fcn.0047ecd0
call fcn.0044f000
test esi, esi
je 0x431d16
lea ecx, [ebp - 0x110]
call fcn.004313f0
cmp byte [0x53a358], 0
jne 0x431cb6
mov ecx, str.REG_LOCAL
call fcn.00487da0
mov byte [0x53a358], 0
test eax, eax
je 0x431c97
mov eax, dword [eax + 4]
jmp 0x431c9c
mov eax, str.MAJIRO_RUNTIME
push 0x800
push eax
push 0x53a358
call fcn.00495450
add esp, 0xc
mov byte [0x53ab57], 0
cmp byte [0x53ab68], 0
jne 0x431cf8
mov ecx, str.REG_GLOBAL
call fcn.00487da0
mov byte [0x53ab68], 0
test eax, eax
je 0x431cd9
mov eax, dword [eax + 4]
jmp 0x431cde
mov eax, str.MAJIRO_SYSTEM
push 0x800
push eax
push 0x53ab68
call fcn.00495450
add esp, 0xc
mov byte [0x53b367], 0
push 0
push 0x4e65e0
push str.CapFolder
mov edx, 0x53a358
mov ecx, 0x53ab68
call fcn.0047e3b0
add esp, 0xc
mov ecx, dword [ebp - 4]
neg esi
pop edi
sbb esi, esi
xor ecx, ebp
neg esi
lea eax, [esi - 1]
pop esi
call fcn.00493955
mov esp, ebp
pop ebp
ret