Function at 0x10307840
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x59cc
call fcn.10316ad0
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 0x10350948
mov ecx, dword [0x103513c8]
mov edx, dword [ecx + 0x4cc]
call edx
add esp, 8
mov dword [ebp - 0x57e4], eax
cmp dword [ebp + 0x18], 0
je 0x103078ea
mov dword [ebp - str._defaultextension], 0x1031e9a0
jmp 0x103078f4
mov dword [ebp - str._confirmoverwrite], 0x1031e958
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 [0x103513c8]
mov edx, dword [ecx + 0x1f0]
call edx
add esp, 4
lea eax, [ebp - 0xe0]
push eax
mov ecx, dword [0x103513c8]
mov edx, dword [ecx + 0x1f0]
call edx
add esp, 4
mov dword [ebp - 0x2c0], 1
jmp 0x10307968
mov eax, dword [ebp - 0x2c0]
add eax, 2
mov dword [ebp - 0x2c0], eax
mov ecx, dword [ebp - 0x2c0]
cmp ecx, dword [ebp + 0x10]
jge 0x10307c49
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 0x1034f8ec
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 [0x103513c8]
mov eax, dword [edx + 0x4c8]
call eax
add esp, 0x1c
test eax, eax
je 0x103079ce
jmp 0x1030846b
mov ecx, dword [ebp - 0x2c0]
add ecx, 1
cmp ecx, dword [ebp + 0x10]
jne 0x10307a11
push 0
push 0x1034f8f4
mov edx, dword [ebp - 0x57e8]
mov eax, dword [ebp - 0x2cc]
mov ecx, dword [eax + edx*8]
push ecx
push 0x1034f900
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x120]
call ecx
add esp, 0x14
jmp 0x1030846b
mov edx, dword [ebp - 0x57f0]
push edx
mov eax, dword [0x103513c8]
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.0x10307a57
mov edx, dword [ebp - 0x59cc]
jmp dword [edx*4 + 0x103084d4]
mov eax, dword [ebp - 0x57ec]
movsx ecx, byte [eax]
cmp ecx, 0x2e
jne 0x10307a7b
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.0x10307a57
mov ecx, dword [ebp - 0x57f0]
mov dword [ebp - 0x2a4], ecx
jmp case.default.0x10307a57
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x103513c8]
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 [0x103513c8]
mov eax, dword [edx + 0x3ec]
call eax
add esp, 0xc
test eax, eax
jne 0x10307ae0
jmp 0x1030846b
jmp case.default.0x10307a57
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [ebp - 0x57ec]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x103513c8]
mov edx, dword [ecx + 0x3ec]
call edx
add esp, 0xc
test eax, eax
jne 0x10307b11
jmp 0x1030846b
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.102ea630
push eax
push 0
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x538]
call ecx
add esp, 0x2c
lea edx, [ebp - 0x55c0]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
jmp case.default.0x10307a57
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 0x10307b97
jmp 0x1030846b
jmp case.default.0x10307a57
mov edx, dword [ebp - 0x57ec]
mov dword [ebp - 0x1c0], edx
jmp case.default.0x10307a57
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 [0x103513c8]
mov ecx, dword [eax + 0x314]
call ecx
add esp, 0x10
mov dword [ebp - 0x55c4], eax
jmp case.default.0x10307a57
lea edx, [ebp - 0x2a8]
push edx
mov eax, dword [ebp - 0x57f0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [0x103513c8]
mov eax, dword [edx + 0x88]
call eax
add esp, 0xc
test eax, eax
je 0x10307c11
mov eax, 1
jmp 0x103084c6
jmp case.default.0x10307a57
lea ecx, [ebp - 0x5784]
push ecx
mov edx, dword [ebp - 0x57f0]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x103513c8]
mov edx, dword [ecx + 0x88]
call edx
add esp, 0xc
test eax, eax
je case.default.0x10307a57
mov eax, 1
jmp 0x103084c6
jmp 0x10307959
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.103062f0
add esp, 0x14
test eax, eax
je 0x10307c7a
jmp 0x1030846b
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 0x10307cdb
mov dword [ebp - 0x57e0], 0x4c
jmp 0x10307ce5
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], 0x10306850
lea edx, [ebp - 0x2b4]
mov dword [ebp - 0x57a0], edx
cmp dword [ebp + 0x18], 0
je 0x10307d55
mov eax, dword [ebp - 0x57ac]
or eax, 0x1000
mov dword [ebp - 0x57ac], eax
jmp 0x10307d6d
cmp dword [ebp - 0x5784], 0
je 0x10307d6d
mov ecx, dword [ebp - 0x57ac]
or ecx, 2
mov dword [ebp - 0x57ac], ecx
mov edx, dword [ebp - 0x57e4]
cmp dword [edx], 0
je 0x10307d81
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2b4], eax
cmp dword [ebp - 0x2a8], 0
je 0x10307dbf
mov ecx, dword [ebp - 0x57ac]
or ecx, 0x200
mov dword [ebp - 0x57ac], ecx
mov dword [ebp - 0x2b0], 0x200
push 0x400
mov edx, dword [0x103513c8]
mov eax, dword [edx + 0x14]
call eax
add esp, 4
mov dword [ebp - 0x2ac], eax
cmp dword [ebp - 0x55cc], 0
je 0x10307df1
lea ecx, [ebp - 0x3a8]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp - 0x55cc]
push edx
mov eax, dword [0x103513cc]
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 [0x103513cc]
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 0x10307e5f
lea eax, [ebp - 0x5780]
push eax
mov ecx, dword [ebp - 0xdc]
push ecx
mov edx, dword [ebp - 0xe0]
push edx
mov eax, dword [0x103513cc]
mov ecx, dword [eax + 8]
call ecx
add esp, 0xc
jmp 0x10307f0d
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x103513c8]
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 [0x103513c8]
mov edx, dword [ecx + 0x5bc]
call edx
add esp, 8
test eax, eax
je 0x10307ebc
lea eax, [ebp - 0x58c8]
push eax
mov ecx, dword [ebp - 0xe0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x3ec]
call ecx
add esp, 0xc
test eax, eax
jne 0x10307ed2
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x36c]
call ecx
add esp, 4
jmp 0x10307ef5
lea edx, [ebp - 0x5780]
push edx
mov eax, dword [ebp - 0x58c4]
push eax
mov ecx, dword [ebp - 0x58c8]
push ecx
mov edx, dword [0x103513cc]
mov eax, dword [edx + 8]
call eax
add esp, 0xc
lea ecx, [ebp - 0x58c8]
push ecx
mov edx, dword [0x103513c8]
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 0x10307f4c
lea edx, [ebp - 0x2a0]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x1c0]
push eax
mov ecx, dword [0x103513cc]
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 [0x103513c8]
mov edx, dword [ecx + 0x3ac]
call edx
add esp, 4
mov dword [ebp - 0x2c4], eax
cmp dword [ebp + 0x18], 0
je 0x10307f80
lea eax, [ebp - 0x57e0]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
mov dword [ebp - 0x2c8], eax
jmp 0x10307f93
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 [0x103513c8]
mov ecx, dword [eax + 0x3ac]
call ecx
add esp, 4
call fcn.10306c60
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 [0x103513c8]
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 0x10308009
cmp dword [ebp - 0x1c4], 0x3003
jne 0x10308377
mov eax, dword [ebp - 0x57ac]
and eax, 0x200
je 0x10308377
mov dword [ebp - 0x58cc], 0
mov ecx, dword [ebp - 0x57ac]
and ecx, 0x200
je 0x10308213
mov edx, dword [ebp - 0x2ac]
mov dword [ebp - 0x58d8], edx
mov eax, dword [0x103513c8]
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.10305d90
add esp, 8
mov ecx, dword [ebp - 0x58d8]
movzx edx, word [ecx]
test edx, edx
je 0x10308184
mov eax, dword [ebp - 0x58d8]
movzx ecx, word [eax]
test ecx, ecx
je 0x10308093
mov edx, dword [ebp - 0x58d8]
add edx, 2
mov dword [ebp - 0x58d8], edx
jmp 0x10308075
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 0x1030817f
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.10305d90
add esp, 8
mov eax, dword [ebp - 0x55bc]
push eax
mov ecx, dword [ebp - 0x55c0]
push ecx
mov edx, dword [0x103513c8]
mov eax, dword [edx + 0xe8]
call eax
add esp, 8
mov dword [ebp - 0x59b4], eax
push 0xffffffffffffffff
push 0x1034f90c
mov ecx, dword [ebp - 0x59b4]
push ecx
mov edx, dword [0x103513c8]
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 [0x103513c8]
mov edx, dword [ecx + 0x48]
call edx
add esp, 0xc
mov dword [ebp - 0x58cc], 1
lea eax, [ebp - 0x59b0]
push eax
mov ecx, dword [0x103513c8]
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 [0x103513c8]
mov eax, dword [edx + 0xb8]
call eax
add esp, 0xc
jmp 0x10308064
cmp dword [ebp - 0x58d4], 0
jne 0x103081dd
mov ecx, dword [ebp - 0x55bc]
push ecx
mov edx, dword [ebp - 0x55c0]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0xe8]
call ecx
add esp, 8
push eax
mov edx, dword [ebp - 0x58d0]
push edx
push 0
mov eax, dword [0x103513c8]
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 [0x103513c8]
mov eax, dword [edx + 0x3b4]
call eax
add esp, 8
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [0x103513c8]
mov eax, dword [edx + 0x1e8]
call eax
add esp, 4
jmp 0x1030826b
push 0
lea ecx, [ebp - 0x55c0]
push ecx
mov edx, dword [ebp - 0x57c4]
push edx
call fcn.10305d90
add esp, 8
push eax
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x103513c8]
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 [0x103513c8]
mov eax, dword [edx + 0x1e8]
call eax
add esp, 4
mov dword [ebp - 0x5788], 0
cmp dword [ebp - 0x57c8], 0
jbe 0x10308375
cmp dword [ebp - 0x58cc], 0
je 0x10308375
cmp dword [ebp - 0x2b8], 0
je 0x10308375
cmp dword [ebp - 0x2a4], 0
je 0x10308375
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 [0x103513c8]
mov eax, dword [edx + 0xbc]
call eax
add esp, 0x10
test eax, eax
je 0x103082f7
mov dword [ebp - 0x5788], 1
jmp 0x10308375
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 [0x103513c8]
mov edx, dword [ecx + 0xbc]
call edx
add esp, 0x10
test eax, eax
je 0x1030833b
mov dword [ebp - 0x5788], 1
jmp 0x10308375
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 [0x103513c8]
mov edx, dword [ecx + 0x318]
call edx
add esp, 0x14
test eax, eax
jne 0x10308375
mov dword [ebp - 0x5788], 1
jmp 0x103083f4
cmp dword [ebp - 0x1c4], 0x3002
jne 0x103083ea
push 0
push str.invalid_filename__
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [0x103513c8]
mov edx, dword [ecx + 0x3a8]
call edx
add esp, 0xc
push 0
push 0x1034f924
lea eax, [ebp - 0x55c0]
push eax
mov ecx, dword [ebp - 0x57c4]
push ecx
call fcn.10305d90
add esp, 8
push eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x120]
call ecx
add esp, 0x10
lea edx, [ebp - 0x55c0]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
jmp 0x103083f4
mov dword [ebp - 0x5788], 0
cmp dword [ebp - 0x57b0], 0
je 0x10308414
lea edx, [ebp - 0x2a0]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x57b4], 0
je 0x10308434
lea edx, [ebp - 0x5780]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0x56a8]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x57a4], 0
je 0x1030846b
lea edx, [ebp - 0x3a8]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0xe0]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
lea edx, [ebp - 0x1b8]
push edx
mov eax, dword [0x103513c8]
mov ecx, dword [eax + 0x1e8]
call ecx
add esp, 4
cmp dword [ebp - 0x2ac], 0
je 0x103084c0
mov edx, dword [ebp - 0x2ac]
push edx
mov eax, dword [0x103513c8]
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