Function at 0x598b30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x62ea78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov eax, dword [0x65329c]
push ebx
push esi
push edi
push eax
mov esi, ecx
push 0
push str.option
lea ecx, [esp + 0x18]
call fcn.004e9b90
lea ecx, [esp + 0xc]
push 0
push ecx
mov ecx, esi
mov dword [esp + 0x38], 0
call fcn.00579190
mov edi, dword [esp + 0x38]
mov edx, dword [esp + 0xc]
or ebx, 0xffffffff
mov dword [edi + 0x20], eax
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebx
mov dword [esp + 0x30], ebx
je 0x598ba6
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598ba6
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [0x65329c]
lea ecx, [esp + 0x38]
push eax
push 0
push str.flag
call fcn.004e9b90
lea ecx, [esp + 0x38]
push 0
push ecx
mov ecx, esi
mov dword [esp + 0x38], 1
call fcn.00578b90
mov edx, dword [esp + 0x38]
mov dword [edi + 0x28], eax
mov dword [esp + 0x30], ebx
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebx
je 0x598bf8
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598bf8
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [0x65329c]
lea ecx, [esp + 0x38]
push eax
push 0
push str.border
call fcn.004e9b90
push 0
lea ecx, [esp + 0x3c]
push 0
push ecx
mov ecx, esi
mov dword [esp + 0x3c], 2
call fcn.0057a9b0
mov edx, dword [esp + 0x38]
mov dword [edi + 0x24], eax
mov dword [esp + 0x30], ebx
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
cmp ecx, ebx
je 0x598c4c
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598c4c
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [0x65329c]
lea ecx, [esp + 0x38]
push eax
push 0
push str.minsize
call fcn.004e9b90
lea ecx, [esp + 0x38]
push 0
lea edx, [esp + 0x1c]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x3c], 3
call fcn.0057a6f0
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, ebx
je 0x598c9f
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598c9f
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0x18]
mov eax, dword [0x7011f4]
cmp ecx, eax
jne 0x598cb9
mov edx, dword [esp + 0x1c]
mov eax, dword [0x7011f8]
cmp edx, eax
je 0x598cda
cmp dword [edi + 8], 1
jne 0x598ccc
mov ecx, dword [edi + 0xc]
lea edx, [esp + 0x18]
push edx
mov eax, dword [ecx]
call dword [eax + 0x78]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], ecx
mov edx, dword [0x65329c]
lea ecx, [esp + 0x38]
push edx
push 0
push str.ratio
call fcn.004e9b90
lea eax, [esp + 0x38]
push 0
lea ecx, [esp + 0x10]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x3c], 4
call fcn.0057a6f0
mov edx, dword [eax]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
lea eax, [ecx - 0xc]
mov dword [esp + 0x30], ebx
mov ecx, dword [eax]
cmp ecx, ebx
je 0x598d3b
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598d3b
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [0x7011f4]
cmp eax, ecx
jne 0x598d57
mov edx, dword [esp + 0x1c]
mov ecx, dword [0x7011f8]
cmp edx, ecx
je 0x598d76
test eax, eax
je 0x598d6d
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x598d6d
fild dword [esp + 0x18]
fidiv dword [esp + 0x1c]
jmp 0x598d73
fld dword [0x64acc0]
fstp dword [edi + 0x3c]
mov al, byte [esi + 0x3d]
test al, al
je 0x598e31
mov eax, dword [0x65329c]
lea ecx, [esp + 0x38]
push eax
push 0
push str.cellpos
call fcn.004e9b90
lea ecx, [esp + 0x38]
lea edx, [esp + 0xc]
push ecx
push edx
mov ecx, esi
mov dword [esp + 0x38], 5
call fcn.00598a20
push eax
mov ecx, edi
call fcn.005cc390
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], ebx
add eax, 0xfffffff4
mov ecx, dword [eax]
cmp ecx, ebx
je 0x598dda
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598dda
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [0x65329c]
push ecx
push 0
push str.cellspan
lea ecx, [esp + 0x20]
call fcn.004e9b90
lea edx, [esp + 0x14]
lea eax, [esp + 0x20]
push edx
push eax
mov ecx, esi
mov dword [esp + 0x38], 6
call fcn.00598a60
push eax
mov ecx, edi
call fcn.005cc3d0
mov ecx, dword [esp + 0x14]
lea eax, [ecx - 0xc]
mov ecx, dword [ecx - 0xc]
cmp ecx, ebx
je 0x598e31
dec ecx
test ecx, ecx
mov dword [eax], ecx
jne 0x598e31
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x28
ret 4