Function at 0x499028
Capabilities:
Get common file path
Parse pe header
Set current directory

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffef8
mov ebx, eax
mov esi, dword [0x4be784]
mov edi, dword [0x4beb38]
mov ebp, dword [0x4be6b0]
mov byte [esp], 0
push pe_nt_image_headers32
push edi
push 0x63
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemTextA
mov eax, edi
call fcn.004aeddc
mov eax, edi
call fcn.004aedb4
lea eax, [esp + 8]
push eax
push 0xff
call sub.kernel32.dll_GetCurrentDirectoryA
push edi
lea eax, [esi + 0x100]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
je 0x49911b
mov eax, edi
call fcn.004aeddc
push edi
call sub.kernel32.dll_SetCurrentDirectoryA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4990d7
mov ax, 0x7a
call fcn.004aa600
mov edx, edi
call fcn.004ae1b0
mov eax, dword [0x4bedb0]
mov edx, 1
call fcn.004b12a8
push 0x63
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SetFocus
jmp 0x4995fd
mov eax, edi
call fcn.004aedb4
mov eax, dword [0x4be744]
cmp dword [eax], 0
jle 0x49910c
mov eax, edi
call fcn.004b8404
mov edx, dword [0x4bec58]
mov dword [edx], eax
mov ax, 0x76
call fcn.004aa600
mov edx, 4
call fcn.004b12a8
jmp 0x499128
mov edx, edi
lea eax, [esi + 0x100]
call fcn.004b81b0
jmp 0x499128
mov edx, edi
lea eax, [esi + 0x100]
call fcn.004b81b0
push pe_nt_image_headers32
push edi
push 0x67
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemTextA
mov eax, edi
call fcn.004aeddc
mov eax, edi
call fcn.004aedb4
push edi
lea eax, [esi + 0x200]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
je 0x4991b8
mov eax, edi
call fcn.004aeddc
push edi
call sub.kernel32.dll_SetCurrentDirectoryA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4991a2
mov ax, 0x7a
call fcn.004aa600
mov edx, edi
call fcn.004ae1b0
mov eax, dword [0x4bedb0]
mov edx, 1
call fcn.004b12a8
push 0x67
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SetFocus
jmp 0x4995fd
mov eax, edi
call fcn.004aedb4
mov edx, edi
lea eax, [esi + 0x200]
call fcn.004b81b0
jmp 0x4991c5
mov edx, edi
lea eax, [esi + 0x200]
call fcn.004b81b0
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
push pe_nt_image_headers32
push edi
push 0x66
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemTextA
mov eax, edi
call fcn.004aeddc
mov eax, edi
call fcn.004aedb4
lea eax, [esp + 8]
push eax
push 0xff
call sub.kernel32.dll_GetCurrentDirectoryA
push edi
lea eax, [esi + 0x300]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
je 0x49926e
mov eax, edi
call fcn.004aeddc
push edi
call sub.kernel32.dll_SetCurrentDirectoryA
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x499258
mov ax, 0x7a
call fcn.004aa600
mov edx, edi
call fcn.004ae1b0
mov eax, dword [0x4bedb0]
mov edx, 1
call fcn.004b12a8
push 0x66
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SetFocus
jmp 0x4995fd
mov eax, edi
call fcn.004aedb4
mov edx, edi
lea eax, [esi + 0x300]
call fcn.004b81b0
jmp 0x49927b
mov edx, edi
lea eax, [esi + 0x300]
call fcn.004b81b0
push 0xa
mov eax, dword [0x4bedb0]
push eax
push 0x68
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemTextA
mov edi, eax
mov eax, dword [0x4bedb0]
push eax
call sub.user32.dll_CharUpperA
mov eax, ebx
mov dx, 0x65
call fcn.00497994
test al, al
je 0x499318
mov eax, edi
dec eax
test eax, eax
jl 0x499318
inc eax
mov dword [esp + 4], eax
mov eax, dword [0x4bedb0]
mov dl, byte [eax]
mov ecx, dword [0x4bebbc]
and edx, 0xff
bt dword [ecx], edx
setb dl
test dl, dl
je 0x4992e9
mov edx, edi
and edx, 0x80000001
jns 0x4992e1
dec edx
or edx, 0xfffffffe
inc edx
dec edx
je 0x4992e9
cmp edi, 8
jle 0x499311
mov ax, 0x75
call fcn.004aa600
mov edx, 3
call fcn.004b12a8
push 0x68
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItem
push eax
call sub.user32.dll_SetFocus
jmp 0x4995fd
inc eax
dec dword [esp + 4]
jne 0x4992ba
mov eax, edi
sar eax, 1
jns 0x499321
adc eax, 0
mov byte [esi + 0x188b], al
mov edx, dword [0x4bedb0]
lea eax, [esi + 0xa30]
call fcn.004b81b0
push 0
mov eax, dword [0x4bedf4]
push eax
push 0x4e
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemInt
mov dword [ebp], eax
mov eax, dword [0x4bedf4]
cmp dword [eax], 0
je 0x499371
cmp dword [ebp], 0
jl 0x499371
cmp dword [ebp], 0xff
jg 0x499371
mov al, byte [ebp]
mov byte [esi + 0x18a5], al
jmp 0x499381
mov eax, ebx
mov dx, 0x4e
call fcn.00488878
jmp 0x4995fd
push 0
mov eax, dword [0x4bedf4]
push eax
push 0x5b
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemInt
mov dword [ebp], eax
mov eax, dword [0x4bedf4]
cmp dword [eax], 0
je 0x4993ba
cmp dword [ebp], 0
jl 0x4993ba
cmp dword [ebp], 0xff
jg 0x4993ba
mov al, byte [ebp]
mov byte [esi + 0x18a0], al
jmp 0x4993ca
mov eax, ebx
mov dx, 0x5b
call fcn.00488878
jmp 0x4995fd
push 0
mov eax, dword [0x4bedf4]
push eax
push 0x4d
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemInt
mov dword [ebp], eax
mov eax, dword [0x4bedf4]
cmp dword [eax], 0
je 0x499400
cmp dword [ebp], 0
jle 0x499400
cmp dword [ebp], 0x63
jg 0x499400
mov al, byte [ebp]
mov byte [esi + 0x18ab], al
jmp 0x499410
mov eax, ebx
mov dx, 0x4d
call fcn.00488878
jmp 0x4995fd
push 0
mov eax, dword [0x4bedf4]
push eax
push 0x4b
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemInt
mov dword [ebp], eax
mov eax, dword [0x4bedf4]
cmp dword [eax], 0
je 0x49944b
cmp dword [ebp], 0
jle 0x49944b
cmp dword [ebp], 0x100
jg 0x49944b
mov ax, word [ebp]
mov word [esi + 0x1e1c], ax
jmp 0x49945b
mov eax, ebx
mov dx, 0x4b
call fcn.00488878
jmp 0x4995fd
push 0
mov eax, dword [0x4bedf4]
push eax
push 0x45
mov eax, dword [ebx]
push eax
call sub.user32.dll_GetDlgItemInt
mov dword [ebp], eax
mov eax, dword [0x4bedf4]
cmp dword [eax], 0
je 0x499496
cmp dword [ebp], 0x28
jl 0x499496
cmp dword [ebp], 0xfa
jg 0x499496
mov ax, word [ebp]
mov word [esi + 0x19cc], ax
jmp 0x4994a6
mov eax, ebx
mov dx, 0x45
call fcn.00488878
jmp 0x4995fd
mov eax, ebx
mov dx, 0x48
call fcn.00497994
mov byte [esi + 0x193b], al
mov eax, ebx
mov dx, 0x46
call fcn.00497994
mov byte [esi + 0x1933], al
push 0x47
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
mov byte [esi + 0x1885], al
mov eax, ebx
mov dx, 0x5e
call fcn.00497994
mov byte [esi + 0x18c3], al
mov eax, ebx
mov dx, 0x5d
call fcn.00497994
mov byte [esi + 0x18c5], al
mov eax, ebx
mov dx, 0x61
call fcn.00497994
mov byte [esi + 0x18be], al
mov eax, ebx
mov dx, 0x5f
call fcn.00497994
mov byte [esi + 0x192f], al
mov eax, ebx
mov dx, 0x62
call fcn.00497994
mov byte [esi + 0x18d1], al
mov eax, ebx
mov dx, 0x55
call fcn.00497994
mov byte [esi + 0x18db], al
mov eax, ebx
mov dx, 0x5a
call fcn.00497994
mov byte [esi + 0x1931], al
mov eax, ebx
mov dx, 0x50
call fcn.00497994
mov byte [esi + 0x18e2], al
push 0x4f
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
mov byte [esi + 0x18a8], al
mov eax, ebx
mov dx, 0x53
call fcn.00497994
mov byte [esi + 0x18e5], al
mov eax, ebx
mov dx, 0x65
call fcn.00497994
mov byte [esi + 0x18d2], al
push 0x58
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
mov byte [esi + 0x189f], al
mov eax, ebx
mov dx, 0x43
call fcn.00497994
mov byte [esi + 0x19ce], al
mov eax, ebx
mov dx, 0x44
call fcn.00497994
mov byte [esi + 0x198e], al
push 0x60
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
xor edx, edx
mov dl, byte [esi + 0x18a4]
cmp eax, edx
je 0x4995e9
push 0x60
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
call fcn.00497d2c
push 0x56
mov eax, dword [ebx]
push eax
call sub.user32.dll_IsDlgButtonChecked
mov byte [esi + 0x1932], al
mov byte [esp], 1
mov al, byte [esp]
add esp, 0x108
pop ebp
pop edi
pop esi
pop ebx
ret