Function at 0x4af340
Capabilities:
Read .ini file
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x2058
call fcn.004d6340
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x5b9260
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
call fcn.004a56d0
mov eax, dword [0x5b5628]
mov ecx, 0x20
mov dword [esp + 0x1c], eax
xor eax, eax
lea edi, [esp + 0xbc]
add esp, 4
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x207c]
mov esi, 1
cmp eax, ebx
mov dword [0x5b5628], esi
je 0x4af3a5
push eax
call fcn.004d6713
add esp, 4
test eax, eax
jbe 0x4af3a5
mov dword [esp + 0x10], esi
lea ecx, [esp + 0xc58]
push 0x5aae60
push ecx
mov dword [esp + 0x24], ebx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x348]
push 0x80
push edx
push str.Admin_SaveFormats
push 0x59e4b4
mov word [esp + 0x358], bx
call fcn.004c5850
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
add esp, 0x18
test eax, eax
jne 0x4af410
push 0x5b9260
lea eax, [esp + 0x344]
push 0x80
push eax
push 0x5aae60
push str.SaveFormats
push 0x59e4b4
call ebp
lea ecx, [esp + 0x340]
push ecx
call fcn.004d6713
add esp, 4
test eax, eax
jbe 0x4af4ff
lea edx, [esp + 0x340]
push 0x7c
push edx
mov dword [esp + 0x1c], esi
call fcn.004c9a70
mov edi, eax
add esp, 8
xor esi, esi
test edi, edi
jle 0x4af4ea
push 0x104
lea eax, [esp + 0x13c]
push 0x7c
push eax
lea ecx, [esp + 0x34c]
push esi
push ecx
call fcn.004c9ab0
lea edx, [esp + 0x14c]
push edx
call fcn.004ae9f0
lea ecx, [esp + 0x458]
dec eax
push ecx
push eax
call fcn.004aee00
lea edx, [esp + 0x460]
push edx
call fcn.004d6713
add esp, 0x24
test eax, eax
jbe 0x4af4d9
lea eax, [esp + 0x138]
lea ecx, [esp + 0x748]
push eax
push str.._s
push ecx
call fcn.004d5ee1
lea edx, [esp + 0x28]
lea eax, [esp + 0x754]
push edx
push eax
lea ecx, [esp + 0x454]
push 0
lea edx, [esp + 0xc70]
push ecx
push edx
call fcn.00457e50
add esp, 0x20
inc ebx
inc esi
cmp esi, edi
jl 0x4af44a
test ebx, ebx
jne 0x4af599
push 0x40
call dword [sym.imp.USER32.dll_MessageBeep]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2058
ret
xor esi, esi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x440]
push eax
push esi
call fcn.004aee00
lea ecx, [esp + 0x80]
push 0x5a462c
push ecx
call fcn.004d631b
lea edx, [esp + 0x450]
push 4
lea eax, [esp + 0x90]
push edx
push eax
call fcn.004d6c3f
lea ecx, [esp + 0x94]
push ecx
call fcn.004c8cb0
add esp, 0x20
cmp esi, 7
jne 0x4af56c
lea edx, [esp + 0x78]
push str._.JPEG
push edx
call fcn.004d62f1
add esp, 8
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x78]
push eax
push ecx
lea edx, [esp + 0x448]
push ebx
lea eax, [esp + 0xc64]
push edx
push eax
call fcn.00457e50
add esp, 0x14
inc esi
cmp esi, 0x16
jl 0x4af501
mov ecx, dword [esp + 0x1c]
push 0x5aae60
lea edx, [esp + ecx*2 + 0xc5c]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [0x5b5574]
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
add esp, 8
lea eax, [esp + 0x648]
push 0x80
push eax
push 0x504
push ecx
call edi
mov esi, dword [esp + 0x2078]
cmp esi, 1
jne 0x4af5fa
mov eax, dword [0x5b5574]
lea edx, [esp + 0x648]
push 0x80
push edx
push 0x4f5
push eax
jmp 0x4af637
cmp esi, 2
jne 0x4af639
mov edx, dword [0x5b5574]
lea ecx, [esp + 0x648]
push 0x80
push ecx
push 0x4e8a
push edx
call edi
test eax, eax
jne 0x4af639
mov ecx, dword [0x5b5574]
lea eax, [esp + 0x648]
push 0x80
push eax
push 0x4f5
push ecx
call edi
mov ebx, dword [esp + 0x206c]
lea edx, [esp + 0x1868]
push 4
push edx
push ebx
call fcn.004c93e0
lea eax, [esp + 0x754]
push 5
push eax
call fcn.00499400
add esp, 0x14
lea ecx, [esp + 0x440]
lea edx, [esp + 0x748]
push 0x5b9260
push 0x104
push ecx
push edx
push str.SaveDir
push 0x59e4b4
call ebp
test esi, esi
jne 0x4af7a6
lea eax, [esp + 0x440]
push 3
push eax
push ebx
call fcn.004c93e0
lea ecx, [esp + 0x144]
push 8
push ecx
push ebx
call fcn.004c93e0
mov eax, dword [esp + 0x2c]
add esp, 0x18
test eax, eax
je 0x4af6d5
lea edx, [esp + 0x13a]
lea eax, [esp + 0x340]
push edx
push eax
call fcn.004af2c0
add esp, 8
jmp 0x4af6e5
lea ecx, [esp + 0x13a]
push ecx
call fcn.004ae9f0
add esp, 4
mov esi, eax
lea edx, [esp + 0x13a]
lea eax, [esp + 0xb8]
push edx
push eax
call fcn.004d631b
lea ecx, [esp + 0x448]
push ecx
call fcn.004d6713
add esp, 0xc
test eax, eax
jne 0x4af730
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4af77e
mov edx, dword [esp + 0x207c]
lea eax, [esp + 0x440]
push edx
push eax
call fcn.004d631b
add esp, 8
cmp esi, 0xffffffff
jne 0x4af7f5
push 0x5b9260
lea edx, [esp + 0x13c]
push 0x104
push edx
push 0x598468
push str.SaveExtension
push 0x59e4b4
call ebp
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4af7cb
lea eax, [esp + 0x138]
lea ecx, [esp + 0x340]
push eax
push ecx
call fcn.004af2c0
add esp, 8
jmp 0x4af7db
push 0x5b9260
lea ecx, [esp + 0x444]
push 0x104
lea edx, [esp + 0x750]
push ecx
push edx
push str.SaveDir
push 0x59e4b4
call ebp
jmp 0x4af730
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4af739
mov eax, dword [esp + 0x207c]
lea ecx, [esp + 0x440]
push eax
push ecx
call fcn.004d631b
add esp, 8
jmp 0x4af739
lea edx, [esp + 0x138]
push edx
call fcn.004ae9f0
add esp, 4
mov esi, eax
lea eax, [esp + 0x138]
lea ecx, [esp + 0xb8]
push eax
push ecx
call fcn.004d631b
add esp, 8
mov ecx, 0x16
xor eax, eax
lea edi, [esp + 0x20]
push 1
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], 0x58
call fcn.0047da80
mov edx, dword [0x5b5574]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x444]
lea eax, [esp + 0xc5c]
lea ecx, [esp + 0x186c]
add esp, 4
mov dword [esp + 0x4c], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x3c], ecx
lea edx, [esp + 0x20]
xor ebp, ebp
lea eax, [esp + 0x648]
lea ecx, [esp + 0xb8]
push edx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x44], 0x400
mov dword [esp + 0x48], ebp
mov dword [esp + 0x54], eax
mov word [esp + 0x5c], bp
mov word [esp + 0x5e], bp
mov dword [esp + 0x60], ebp
mov dword [esp + 0x6c], 0x541
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], 0x4ae070
mov dword [esp + 0x58], 0x88006c
call dword [0x5aae24]
test eax, eax
je 0x4afb73
mov eax, dword [esp + 0x2074]
mov esi, dword [esp + 0x2070]
mov edi, esi
lea ecx, [eax + eax]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x3c]
push eax
call fcn.004d6713
add esp, 4
cmp eax, 0xfe
jae 0x4af8f2
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004d6713
add esp, 4
jmp 0x4af8f7
mov eax, 0xfe
mov edx, dword [esp + 0x3c]
push eax
push edx
push esi
call fcn.004d6c3f
lea eax, [esp + 0x754]
push 3
push eax
push esi
call fcn.004c93e0
lea ecx, [esp + 0x150]
push 8
push ecx
push esi
call fcn.004c93e0
lea edx, [esp + 0xdc]
lea eax, [esp + 0x974]
push edx
push 0x59e450
push eax
call fcn.004d5ee1
lea ecx, [esp + 0x168]
lea edx, [esp + 0x980]
push ecx
push edx
call fcn.004d7652
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0x38
test eax, eax
je 0x4afa15
lea eax, [esp + 0x138]
push str..jpeg
push eax
call fcn.004d7652
add esp, 8
test eax, eax
jne 0x4af991
lea ecx, [esp + 0x138]
push str..jpg
push ecx
call fcn.004d631b
add esp, 8
lea edx, [esp + 0x138]
lea eax, [esp + 0x950]
push edx
push eax
call fcn.004d7652
add esp, 8
test eax, eax
je 0x4afa15
push 0x5b9260
push ebp
push str.KeepExtCase
push 0x59e4b4
call edi
cmp eax, 1
jne 0x4afa04
lea ecx, [esp + 0x138]
push 8
push ecx
push ebx
call fcn.004c93e0
lea edx, [esp + 0x144]
lea eax, [esp + 0x95c]
push edx
push eax
call fcn.004d7652
add esp, 0x14
test eax, eax
jne 0x4af9fa
lea ecx, [esp + 0x138]
push ecx
jmp 0x4afa0c
lea edx, [esp + 0x950]
push edx
jmp 0x4afa0c
lea eax, [esp + 0x950]
push eax
push esi
call fcn.004d62f1
add esp, 8
push esi
call fcn.004381b0
add esp, 4
test eax, eax
je 0x4afb12
mov eax, dword [esp + 0x2078]
push 0x5b9260
cmp eax, ebp
push 1
jne 0x4afa3f
push str.AskOverwriteSave
jmp 0x4afa44
push str.AskOverwriteSaveAs
push str.Others
call edi
cmp eax, ebp
je 0x4afb12
mov edx, dword [0x5b5574]
lea ecx, [esp + 0xb58]
push 0x80
push ecx
push 0x4f6
push edx
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [esp + 0xb58]
push esi
push eax
lea ecx, [esp + 0x1460]
push str._s:__s___n
push ecx
call fcn.004d5ee1
add esp, 0x10
lea edx, [esp + 0x1458]
push 0x124
push 0x5b96a0
push edx
push 1
call fcn.0047da80
add esp, 4
push eax
call fcn.00446950
add esp, 0x10
cmp eax, 7
jne 0x4afb12
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea ecx, [esp + 0xb8]
push 0x5b9260
push ecx
push str.SaveExtension
push 0x59e4b4
mov dword [0x5b5628], eax
call esi
cmp dword [esp + 0x10], ebp
jne 0x4afb7c
lea edx, [esp + 0x748]
push 0x5b9260
push edx
push str.SaveDir
push 0x59e4b4
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2058
ret
cmp dword [esp + 0x2078], ebp
jle 0x4afb59
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
lea eax, [esp + 0xb8]
push 0x5b9260
push eax
push str.SaveExtension
push 0x59e4b4
call esi
cmp dword [esp + 0x10], ebp
jne 0x4afb59
lea ecx, [esp + 0x748]
push 0x5b9260
push ecx
push str.SaveDir
push 0x59e4b4
call esi
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov dword [0x5b5628], edx
mov eax, 1
pop ebx
add esp, 0x2058
ret
mov eax, dword [esp + 0x18]
mov dword [0x5b5628], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2058
ret