Function at 0x51a7a0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x539ca0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x575494]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x5776b8]
and eax, 0x3ff
dec eax
cmp eax, 0x59
ja case.0x51a7df.2
movzx eax, byte [eax + 0x51adcc]
jmp dword [eax*4 + 0x51adc4]
mov byte [ebp - 0x10], 1
jmp 0x51a7f0
mov byte [ebp - 0x10], 0
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
push ecx
lea eax, [edi + 0x5c]
push edx
mov ecx, 0x40
mov dword [ebp - 0x24], eax
call fcn.00511e30
lea esi, [edi + 0x3c]
push esi
mov ecx, 0x554c48
call fcn.00470260
push str.PrntPreView_NextBtn
lea eax, [edi + 0x4c]
call fcn.005080c0
mov eax, dword [esi + 0x10]
mov ecx, eax
test eax, eax
jne 0x51a837
mov ecx, 0x54ee24
xor ebx, ebx
xor eax, eax
cmp dword [esi + 8], ebx
jle 0x51a863
cmp ecx, ebx
je 0x51a863
cmp word [ecx], bx
je 0x51a863
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x51a855
mov eax, 0x54ee24
push eax
push ebx
push str.Width
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [edi + 0x1650], eax
mov eax, dword [esi + 0x10]
mov ecx, eax
cmp eax, ebx
jne 0x51a877
mov ecx, 0x54ee24
xor eax, eax
cmp dword [esi + 8], ebx
jle 0x51a8a1
cmp ecx, ebx
je 0x51a8a1
cmp word [ecx], bx
je 0x51a8a1
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x51a893
mov eax, 0x54ee24
push eax
push ebx
push str.Height
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [edi + 0x1654], eax
mov eax, dword [esi + 0x10]
cmp eax, ebx
jne 0x51a8b3
mov eax, 0x54ee24
mov dword [ebp - 0x10], ebx
cmp dword [esi + 8], ebx
jle 0x51a8e1
cmp eax, ebx
je 0x51a8e1
cmp word [eax], bx
je 0x51a8e1
mov ecx, dword [esi + 4]
cmp ecx, ebx
jne 0x51a8d0
mov ecx, 0x54ee24
push ecx
push ebx
push str.LMargin
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x10], eax
mov ecx, dword [esi + 0x10]
cmp ecx, ebx
jne 0x51a8ed
mov ecx, 0x54ee24
mov dword [ebp - 0x14], ebx
cmp dword [esi + 8], ebx
jle 0x51a91d
cmp ecx, ebx
je 0x51a91d
cmp word [ecx], bx
je 0x51a91d
mov esi, dword [esi + 4]
mov eax, esi
cmp esi, ebx
jne 0x51a90c
mov eax, 0x54ee24
push eax
push ebx
push str.RMargin
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
sub eax, dword [edi + 0x1654]
mov dword [ebp + 0x18], ebx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x1658], eax
mov eax, dword [0x577698]
cmp eax, ebx
mov ebx, dword [sym.imp.USER32.dll_LoadImageW]
je 0x51a977
push 0x80
push 0
push 0
push 0
push 0xc8c9
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x51a96d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov dword [ebp + 0x18], esi
jmp 0x51a981
mov dword [0x57768c], 0x57
mov dword [ebp - 0x18], 0
test eax, eax
je 0x51a9ba
push 0x80
push 0
push 0
push 0
push 0xc8ca
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x51a9b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov dword [ebp - 0x18], esi
jmp 0x51a9c4
mov dword [0x57768c], 0x57
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x51a9fd
push 0x80
push 0
push 0
push 0
push 0xc8cb
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x51a9f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov dword [ebp - 0x1c], esi
jmp 0x51aa07
mov dword [0x57768c], 0x57
xor edx, edx
test eax, eax
je 0x51aa32
push 0x80
push edx
push edx
push edx
push 0xc8cc
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x51aa2e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov edx, esi
jmp 0x51aa3c
mov dword [0x57768c], 0x57
mov ecx, dword [edi + 0x1650]
mov eax, dword [edi + 0x1654]
mov ebx, dword [ebp + 0x18]
mov dword [edi + 0x258], ebx
mov ebx, dword [ebp - 0x18]
mov dword [edi + 0x25c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [edi + 0x2b4], ecx
mov dword [edi + 0x2c4], ecx
push 0x5211
lea ecx, [ebp - 0x30]
mov dword [edi + 0x260], ebx
xor ebx, ebx
push ecx
mov ecx, 0x5776a0
mov dword [edi + 0x264], edx
mov byte [edi + 0x249], 1
mov dword [edi + 0x2ac], ebx
mov dword [edi + 0x2b0], ebx
mov dword [edi + 0x2b8], eax
mov dword [edi + 0x2bc], ebx
mov dword [edi + 0x2c0], ebx
mov dword [edi + 0x2c8], eax
call fcn.00471380
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x244], ebx
cmp eax, ebx
jne 0x51aaca
mov eax, 0x54ee24
mov edx, dword [edi + 0x1654]
mov ecx, dword [edi + 0x1650]
push edx
mov edx, dword [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp + 0xc]
push ecx
push ebx
mov ebx, dword [ebp + 0x10]
push eax
push 0x17f9
push edx
mov eax, 0x10000000
lea ecx, [edi + 0x84]
call fcn.0043b720
mov ecx, dword [edi + 0xb4]
mov esi, eax
test ecx, ecx
je 0x51ab15
push 0
push ecx
call dword [sym.imp.USER32.dll_EnableWindow]
jmp 0x51ab29
mov ecx, dword [edi + 0xb0]
mov ecx, dword [ecx + 4]
mov dword [ecx + edi + 0xb0], 6
mov edi, dword [ebp - 0x30]
test edi, edi
jne 0x51ab35
mov edi, 0x54ee24
mov ecx, dword [ebp - 0x24]
call fcn.00511ea0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
add eax, dword [edi + 0x1650]
mov ecx, dword [ebp + 0x14]
sub ecx, eax
mov dword [edi + 0x165c], eax
mov eax, dword [0x577698]
xor ebx, ebx
mov dword [ebp - 0x1c], ecx
test eax, eax
je 0x51ab90
push 0x80
push ebx
push ebx
push ebx
push 0xc8cd
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, eax
test esi, esi
jne 0x51ab87
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov ebx, esi
jmp 0x51ab9a
mov dword [0x57768c], 0x57
mov dword [ebp + 0x18], 0
test eax, eax
je 0x51abd7
push 0x80
push 0
push 0
push 0
push 0xc8ce
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, eax
test esi, esi
jne 0x51abcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov dword [ebp + 0x18], esi
jmp 0x51abe1
mov dword [0x57768c], 0x57
mov dword [ebp + 0x14], 0
test eax, eax
je 0x51ac1e
push 0x80
push 0
push 0
push 0
push 0xc8cf
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, eax
test esi, esi
jne 0x51ac14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov eax, dword [0x577698]
mov dword [ebp + 0x14], esi
jmp 0x51ac28
mov dword [0x57768c], 0x57
xor edx, edx
test eax, eax
je 0x51ac57
push 0x80
push edx
push edx
push edx
push 0xc8d0
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, eax
test esi, esi
jne 0x51ac53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x57768c], eax
mov edx, esi
jmp 0x51ac61
mov dword [0x57768c], 0x57
mov ecx, dword [edi + 0x1650]
mov eax, dword [edi + 0x1654]
mov dword [edi + 0x504], ebx
mov ebx, dword [ebp + 0x18]
mov dword [edi + 0x508], ebx
mov ebx, dword [ebp + 0x14]
mov dword [edi + 0x560], ecx
mov dword [edi + 0x570], ecx
push 0x5210
lea ecx, [ebp - 0x3c]
mov dword [edi + 0x50c], ebx
xor ebx, ebx
push ecx
mov ecx, 0x5776a0
mov dword [edi + 0x510], edx
mov byte [edi + 0x4f5], 1
mov dword [edi + 0x558], ebx
mov dword [edi + 0x55c], ebx
mov dword [edi + 0x564], eax
mov dword [edi + 0x568], ebx
mov dword [edi + 0x56c], ebx
mov dword [edi + 0x574], eax
call fcn.00471380
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.00508010
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x51acff
push eax
call fcn.0051eadb
add esp, 4
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x4f0], ebx
cmp eax, ebx
jne 0x51ad11
mov eax, 0x54ee24
mov edx, dword [edi + 0x1654]
mov ecx, dword [edi + 0x1650]
push edx
mov edx, dword [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x1c]
push edx
mov edx, dword [ebp + 0xc]
push ecx
push ebx
mov ebx, dword [ebp + 0x10]
push eax
push 0x17fa
push edx
mov eax, 0x10000000
lea ecx, [edi + 0x330]
call fcn.0043b720
mov ecx, dword [edi + 0x360]
mov esi, eax
test ecx, ecx
je 0x51ad5c
push 0
push ecx
call dword [sym.imp.USER32.dll_EnableWindow]
jmp 0x51ad70
mov ecx, dword [edi + 0x35c]
mov ecx, dword [ecx + 4]
mov dword [ecx + edi + 0x35c], 6
mov edi, dword [ebp - 0x30]
test edi, edi
jne 0x51ad7c
mov edi, 0x54ee24
mov ecx, dword [ebp - 0x24]
call fcn.00511ea0
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1650]
add edx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
add edx, dword [ebp - 0x10]
mov dword [eax + 0x164c], edx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x51adb0
push eax
call fcn.0051eadb
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14