Function at 0x10306ba0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x59cc
call fcn.10315eb0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x55c8], 0
mov dword [ebp - 0x5788], 1
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x5784], 1
mov dword [ebp - 0x55cc], 0
mov dword [ebp - 0x1c0], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x2a4], 0
mov dword [ebp - 0x55c4], 0
mov dword [ebp - 0x2b8], 0
push 0x18
push 0x10350828
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x4cc]
call edx
add esp, 8
mov dword [ebp - 0x57e4], eax
cmp dword [ebp + 0x18], 0
je 0x10306c4a
mov dword [ebp - str._defaultextension], 0x1031e928
jmp 0x10306c54
mov dword [ebp - str._confirmoverwrite], 0x1031e8e0
mov eax, dword [ebp - 0x59c8]
mov dword [ebp - 0x2cc], eax
xor ecx, ecx
mov word [ebp - 0x54e8], cx
xor edx, edx
mov dword [ebp - 0x2b4], edx
mov dword [ebp - 0x2b0], edx
mov dword [ebp - 0x2ac], edx
lea eax, [ebp - 0x1b8]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x1f0]
call edx
add esp, 4
lea eax, [ebp - 0xe0]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x1f0]
call edx
add esp, 4
mov dword [ebp - 0x2c0], 1
jmp 0x10306cc8
mov eax, dword [ebp - 0x2c0]
add eax, 2
mov dword [ebp - 0x2c0], eax
mov ecx, dword [ebp - 0x2c0]
cmp ecx, dword [ebp + 0x10]
jge 0x10306fa9
mov edx, dword [ebp - 0x2c0]
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + edx*4 + 4]
mov dword [ebp - 0x57f0], ecx
lea edx, [ebp - 0x57e8]
push edx
push 0
push 0x1034f7cc
push 8
mov eax, dword [ebp - 0x2cc]
push eax
mov ecx, dword [ebp - 0x2c0]
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + ecx*4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x4c8]
call eax
add esp, 0x1c
test eax, eax
je 0x10306d2e
jmp 0x103077cb
mov ecx, dword [ebp - 0x2c0]
add ecx, 1
cmp ecx, dword [ebp + 0x10]
jne 0x10306d71
push 0
push 0x1034f7d4
mov edx, dword [ebp - 0x57e8]
mov eax, dword [ebp - 0x2cc]
mov ecx, dword [eax + edx*8]
push ecx
push 0x1034f7e0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x120]
call ecx
add esp, 0x14
jmp 0x103077cb
mov edx, dword [ebp - 0x57f0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x558]
call ecx
add esp, 4
mov dword [ebp - 0x57ec], eax
mov edx, dword [ebp - 0x57e8]
mov eax, dword [ebp - 0x2cc]
mov ecx, dword [eax + edx*8 + 4]
mov dword [ebp - 0x59cc], ecx
cmp dword [ebp - 0x59cc], 8
ja case.default.0x10306db7
mov edx, dword [ebp - 0x59cc]
jmp dword [edx*4 + 0x10307834]
mov eax, dword [ebp - 0x57ec]
movsx ecx, byte [eax]
cmp ecx, 0x2e
jne 0x10306ddb
mov edx, dword [ebp - 0x57ec]
add edx, 1
mov dword [ebp - 0x57ec], edx
mov eax, dword [ebp - 0x57ec]
mov dword [ebp - 0x55cc], eax
jmp case.default.0x10306db7
mov ecx, dword [ebp - 0x57f0]
mov dword [ebp - 0x2a4], ecx
jmp case.default.0x10306db7
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [ebp - 0x57ec]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x3ec]
call eax
add esp, 0xc
test eax, eax
jne 0x10306e40
jmp 0x103077cb
jmp case.default.0x10306db7
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [ebp - 0x57ec]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x3ec]
call edx
add esp, 0xc
test eax, eax
jne 0x10306e71
jmp 0x103077cb
push 0
push 0
push 0
push 0x5140
lea eax, [ebp - 0x54e8]
push eax
push 0
push 0
mov ecx, dword [ebp - 0x55bc]
push ecx
mov edx, dword [ebp - 0x55c0]
push edx
call fcn.102e99f0
push eax
push 0
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x538]
call ecx
add esp, 0x2c
lea edx, [ebp - 0x55c0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
jmp case.default.0x10306db7
mov edx, dword [ebp - 0x1bc]
push edx
mov eax, dword [ebp - 0x57ec]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sym.tk85.dll_Tk_NameToWindow
add esp, 0xc
mov dword [ebp - 0x1bc], eax
cmp dword [ebp - 0x1bc], 0
jne 0x10306ef7
jmp 0x103077cb
jmp case.default.0x10306db7
mov edx, dword [ebp - 0x57ec]
mov dword [ebp - 0x1c0], edx
jmp case.default.0x10306db7
mov eax, dword [ebp - 0x57f0]
mov dword [ebp - 0x2b8], eax
push 1
push 0
mov ecx, dword [ebp - 0x2b8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x314]
call ecx
add esp, 0x10
mov dword [ebp - 0x55c4], eax
jmp case.default.0x10306db7
lea edx, [ebp - 0x2a8]
push edx
mov eax, dword [ebp - 0x57f0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x88]
call eax
add esp, 0xc
test eax, eax
je 0x10306f71
mov eax, 1
jmp 0x10307826
jmp case.default.0x10306db7
lea ecx, [ebp - 0x5784]
push ecx
mov edx, dword [ebp - 0x57f0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x88]
call edx
add esp, 0xc
test eax, eax
je case.default.0x10306db7
mov eax, 1
jmp 0x10307826
jmp 0x10306cb9
lea eax, [ebp - 0x55c8]
push eax
mov ecx, dword [ebp - 0x55c4]
push ecx
lea edx, [ebp - 0x1b8]
push edx
mov eax, dword [ebp - 0x2a4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.10305650
add esp, 0x14
test eax, eax
je 0x10306fda
jmp 0x103077cb
mov edx, dword [ebp - 0x1bc]
push edx
call sym.tk85.dll_Tk_MakeWindowExist
add esp, 4
mov eax, dword [ebp - 0x1bc]
mov ecx, dword [eax + 0x14]
push ecx
call sym.tk85.dll_Tk_GetHWND
add esp, 4
mov dword [ebp - 0x2bc], eax
push 0x58
push 0
lea edx, [ebp - 0x57e0]
push edx
call sub.MSVCR90.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xffff
movzx eax, ax
and eax, 0xff
movzx ecx, al
cmp ecx, 5
jge 0x1030703b
mov dword [ebp - 0x57e0], 0x4c
jmp 0x10307045
mov dword [ebp - 0x57e0], 0x58
mov edx, dword [ebp - 0x2bc]
mov dword [ebp - 0x57dc], edx
push 0xfffffffffffffffa
mov eax, dword [ebp - 0x57dc]
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov dword [ebp - 0x57d8], eax
lea ecx, [ebp - 0x54e8]
mov dword [ebp - 0x57c4], ecx
mov dword [ebp - 0x57c0], 0x28a0
mov dword [ebp - 0x57ac], 0x88082c
mov dword [ebp - 0x579c], 0x10305bb0
lea edx, [ebp - 0x2b4]
mov dword [ebp - 0x57a0], edx
cmp dword [ebp + 0x18], 0
je 0x103070b5
mov eax, dword [ebp - 0x57ac]
or eax, 0x1000
mov dword [ebp - 0x57ac], eax
jmp 0x103070cd
cmp dword [ebp - 0x5784], 0
je 0x103070cd
mov ecx, dword [ebp - 0x57ac]
or ecx, 2
mov dword [ebp - 0x57ac], ecx
mov edx, dword [ebp - 0x57e4]
cmp dword [edx], 0
je 0x103070e1
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2b4], eax
cmp dword [ebp - 0x2a8], 0
je 0x1030711f
mov ecx, dword [ebp - 0x57ac]
or ecx, 0x200
mov dword [ebp - 0x57ac], ecx
mov dword [ebp - 0x2b0], 0x200
push 0x400
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x14]
call eax
add esp, 4
mov dword [ebp - 0x2ac], eax
cmp dword [ebp - 0x55cc], 0
je 0x10307151
lea ecx, [ebp - 0x3a8]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp - 0x55cc]
push edx
mov eax, dword [0x1035128c]
mov ecx, dword [eax + 8]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x3a8]
mov dword [ebp - 0x57a4], edx
lea eax, [ebp - 0x56a8]
push eax
mov ecx, dword [ebp - 0x1b4]
push ecx
mov edx, dword [ebp - 0x1b8]
push edx
mov eax, dword [0x1035128c]
mov ecx, dword [eax + 8]
call ecx
add esp, 0xc
mov edx, dword [ebp - 0x56a8]
mov dword [ebp - 0x57d4], edx
mov eax, dword [ebp - 0x55c8]
mov dword [ebp - 0x57c8], eax
mov ecx, dword [ebp - 0xe0]
movsx edx, byte [ecx]
test edx, edx
je 0x103071bf
lea eax, [ebp - 0x5780]
push eax
mov ecx, dword [ebp - 0xdc]
push ecx
mov edx, dword [ebp - 0xe0]
push edx
mov eax, dword [0x1035128c]
mov ecx, dword [eax + 8]
call ecx
add esp, 0xc
jmp 0x1030726d
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x5bc]
call edx
add esp, 8
test eax, eax
je 0x1030721c
lea eax, [ebp - 0x58c8]
push eax
mov ecx, dword [ebp - 0xe0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x3ec]
call ecx
add esp, 0xc
test eax, eax
jne 0x10307232
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x36c]
call ecx
add esp, 4
jmp 0x10307255
lea edx, [ebp - 0x5780]
push edx
mov eax, dword [ebp - 0x58c4]
push eax
mov ecx, dword [ebp - 0x58c8]
push ecx
mov edx, dword [0x1035128c]
mov eax, dword [edx + 8]
call eax
add esp, 0xc
lea ecx, [ebp - 0x58c8]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x1e8]
call eax
add esp, 4
mov ecx, dword [ebp - 0x5780]
mov dword [ebp - 0x57b4], ecx
cmp dword [ebp - 0x1c0], 0
je 0x103072ac
lea edx, [ebp - 0x2a0]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x1c0]
push eax
mov ecx, dword [0x1035128c]
mov edx, dword [ecx + 8]
call edx
add esp, 0xc
mov eax, dword [ebp - 0x2a0]
mov dword [ebp - 0x57b0], eax
push 1
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x3ac]
call edx
add esp, 4
mov dword [ebp - 0x2c4], eax
cmp dword [ebp + 0x18], 0
je 0x103072e0
lea eax, [ebp - 0x57e0]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
mov dword [ebp - 0x2c8], eax
jmp 0x103072f3
lea ecx, [ebp - 0x57e0]
push ecx
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
mov dword [ebp - 0x2c8], eax
mov edx, dword [ebp - 0x2c4]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x3ac]
call ecx
add esp, 4
call fcn.10305fc0
push 1
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.USER32.dll_EnableWindow]
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x36c]
call edx
add esp, 4
call dword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
mov dword [ebp - 0x1c4], eax
cmp dword [ebp - 0x2c8], 0
jne 0x10307369
cmp dword [ebp - 0x1c4], 0x3003
jne 0x103076d7
mov eax, dword [ebp - 0x57ac]
and eax, 0x200
je 0x103076d7
mov dword [ebp - 0x58cc], 0
mov ecx, dword [ebp - 0x57ac]
and ecx, 0x200
je 0x10307573
mov edx, dword [ebp - 0x2ac]
mov dword [ebp - 0x58d8], edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0xe4]
call ecx
mov dword [ebp - 0x58d0], eax
mov dword [ebp - 0x58d4], 0
lea edx, [ebp - 0x55c0]
push edx
mov eax, dword [ebp - 0x58d8]
push eax
call fcn.103050f0
add esp, 8
mov ecx, dword [ebp - 0x58d8]
movzx edx, word [ecx]
test edx, edx
je 0x103074e4
mov eax, dword [ebp - 0x58d8]
movzx ecx, word [eax]
test ecx, ecx
je 0x103073f3
mov edx, dword [ebp - 0x58d8]
add edx, 2
mov dword [ebp - 0x58d8], edx
jmp 0x103073d5
mov eax, dword [ebp - 0x58d8]
add eax, 2
mov dword [ebp - 0x58d8], eax
mov ecx, dword [ebp - 0x58d8]
movzx edx, word [ecx]
test edx, edx
je 0x103074df
mov eax, dword [ebp - 0x58d4]
add eax, 1
mov dword [ebp - 0x58d4], eax
lea ecx, [ebp - 0x59b0]
push ecx
mov edx, dword [ebp - 0x58d8]
push edx
call fcn.103050f0
add esp, 8
mov eax, dword [ebp - 0x55bc]
push eax
mov ecx, dword [ebp - 0x55c0]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0xe8]
call eax
add esp, 8
mov dword [ebp - 0x59b4], eax
push 0xffffffffffffffff
push 0x1034f7ec
mov ecx, dword [ebp - 0x59b4]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x48]
call eax
add esp, 0xc
mov ecx, dword [ebp - 0x59ac]
push ecx
mov edx, dword [ebp - 0x59b0]
push edx
mov eax, dword [ebp - 0x59b4]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x48]
call edx
add esp, 0xc
mov dword [ebp - 0x58cc], 1
lea eax, [ebp - 0x59b0]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x1e8]
call edx
add esp, 4
mov eax, dword [ebp - 0x59b4]
push eax
mov ecx, dword [ebp - 0x58d0]
push ecx
push 0
mov edx, dword [0x10351288]
mov eax, dword [edx + 0xb8]
call eax
add esp, 0xc
jmp 0x103073c4
cmp dword [ebp - 0x58d4], 0
jne 0x1030753d
mov ecx, dword [ebp - 0x55bc]
push ecx
mov edx, dword [ebp - 0x55c0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0xe8]
call ecx
add esp, 8
push eax
mov edx, dword [ebp - 0x58d0]
push edx
push 0
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0xb8]
call ecx
add esp, 0xc
xor edx, edx
cmp dword [ebp - 0x55bc], 0
setg dl
or edx, dword [ebp - 0x58cc]
mov dword [ebp - 0x58cc], edx
mov eax, dword [ebp - 0x58d0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x3b4]
call eax
add esp, 8
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x1e8]
call eax
add esp, 4
jmp 0x103075cb
push 0
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [ebp - 0x57c4]
push edx
call fcn.103050f0
add esp, 8
push eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x120]
call edx
add esp, 0xc
xor eax, eax
cmp dword [ebp - 0x55bc], 0
setg al
mov dword [ebp - 0x58cc], eax
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0x1e8]
call eax
add esp, 4
mov dword [ebp - 0x5788], 0
cmp dword [ebp - 0x57c8], 0
jbe 0x103076d5
cmp dword [ebp - 0x58cc], 0
je 0x103076d5
cmp dword [ebp - 0x2b8], 0
je 0x103076d5
cmp dword [ebp - 0x2a4], 0
je 0x103076d5
mov dword [ebp - 0x59bc], 0
mov dword [ebp - 0x59c0], 0
lea ecx, [ebp - 0x59bc]
push ecx
lea edx, [ebp - 0x59c4]
push edx
mov eax, dword [ebp - 0x2a4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x10351288]
mov eax, dword [edx + 0xbc]
call eax
add esp, 0x10
test eax, eax
je 0x10307657
mov dword [ebp - 0x5788], 1
jmp 0x103076d5
lea ecx, [ebp - 0x59c0]
push ecx
lea edx, [ebp - 0x59b8]
push edx
mov eax, dword [ebp - 0x57c8]
mov ecx, dword [ebp - 0x59bc]
mov edx, dword [ecx + eax*4 - 4]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0xbc]
call edx
add esp, 0x10
test eax, eax
je 0x1030769b
mov dword [ebp - 0x5788], 1
jmp 0x103076d5
push 0x201
mov eax, dword [ebp - 0x59c0]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [ebp - 0x2b8]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x318]
call edx
add esp, 0x14
test eax, eax
jne 0x103076d5
mov dword [ebp - 0x5788], 1
jmp 0x10307754
cmp dword [ebp - 0x1c4], 0x3002
jne 0x1030774a
push 0
push str.invalid_filename__
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x10351288]
mov edx, dword [ecx + 0x3a8]
call edx
add esp, 0xc
push 0
push 0x1034f804
lea eax, [ebp - 0x55c0]
push eax
mov ecx, dword [ebp - 0x57c4]
push ecx
call fcn.103050f0
add esp, 8
push eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x120]
call ecx
add esp, 0x10
lea edx, [ebp - 0x55c0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
jmp 0x10307754
mov dword [ebp - 0x5788], 0
cmp dword [ebp - 0x57b0], 0
je 0x10307774
lea edx, [ebp - 0x2a0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x57b4], 0
je 0x10307794
lea edx, [ebp - 0x5780]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0x56a8]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x57a4], 0
je 0x103077cb
lea edx, [ebp - 0x3a8]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0x1b8]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x2ac], 0
je 0x10307820
mov edx, dword [ebp - 0x2ac]
push edx
mov eax, dword [0x10351288]
mov ecx, dword [eax + 0x18]
call ecx
add esp, 4
mov dword [ebp - 0x2ac], 0
mov eax, dword [ebp - 0x5788]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1022118e
mov esp, ebp
pop ebp
ret