Function at 0x5978c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x5df728
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x6396a8]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x6396a8]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, ecx
mov ecx, dword [edi + 0x360]
test ecx, ecx
je 0x597915
mov eax, dword [edi + 0x364]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x59791a
call fcn.005b2af7
mov eax, dword [edi + 0x360]
mov ecx, dword [eax + esi*4]
mov dword [edi + 0x36c], ecx
mov ecx, dword [edi + 0x34c]
push 0
call fcn.0055cdf0
mov ecx, dword [edi + 0x350]
mov edx, dword [ecx]
mov eax, dword [edx + 0x94]
push 1
call eax
mov ecx, dword [edi + 0x348]
mov edx, dword [ecx]
mov eax, dword [edx + 0x94]
push 1
call eax
mov ecx, dword [edi + 0x358]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
push 0
call eax
mov ecx, dword [edi + 0x354]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
push 0
call eax
mov ecx, dword [edi + 0x344]
mov edx, dword [ecx]
mov eax, dword [edx + 0x94]
push 1
call eax
mov ecx, dword [edi + 0x344]
push 0
call fcn.005ac030
xor ebx, ebx
lea esi, [edi + 0x378]
nop
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x5979dc
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x5979dc
test ecx, ecx
je 0x5979c3
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x5979c8
call fcn.005b2af7
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + ebx*4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
push 0
call eax
add ebx, 1
jmp 0x5979a0
mov eax, dword [esi + 8]
cmp ecx, eax
mov dword [esp + 0x1c], eax
jbe 0x5979ec
call fcn.005b2af7
mov ebx, dword [esi + 4]
cmp ebx, dword [esi + 8]
jbe 0x5979f9
call fcn.005b2af7
mov ecx, dword [esp + 0x1c]
cmp ebx, ecx
je 0x597a32
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
test eax, eax
lea ecx, [eax*4]
lea edx, [ecx + ebx]
mov dword [esp + 0x18], edx
jle 0x597a2b
mov eax, dword [esp + 0x1c]
push ecx
push eax
push ecx
push ebx
call fcn.005b2972
add esp, 0x10
mov ecx, dword [esp + 0x18]
mov dword [esi + 8], ecx
cmp byte [edi + 0x2ba], 0
jne 0x597b24
mov eax, dword [edi + 0x36c]
push 0xffffffffffffffff
add eax, 0x280
push 0
push eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
call fcn.0043b440
mov ebx, dword [esp + 0x38]
cmp ebx, 4
mov dword [esp + 0x80], 0
mov eax, ebx
jb 0x597a88
mov eax, 4
cmp dword [esp + 0x3c], 0x10
mov ecx, dword [esp + 0x28]
jae 0x597a97
lea ecx, [esp + 0x28]
push eax
push str.flip
push ecx
call fcn.00401040
add esp, 0xc
test eax, eax
jne 0x597ac8
cmp ebx, 4
jb 0x597ac8
cmp ebx, 4
setne al
test eax, eax
jne 0x597ac8
mov ecx, dword [edi + 0x34c]
push 1
call fcn.0055cdf0
jmp 0x597b10
push 5
push str.press
push ebx
push 0
lea ecx, [esp + 0x34]
call fcn.0043b680
test eax, eax
jne 0x597b44
mov ecx, dword [edi + 0x350]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x94]
call eax
mov ecx, dword [edi + 0x358]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
push 1
call eax
mov ecx, dword [edi + 0x358]
push 0x14
push 0
push 0x32
call fcn.00557100
cmp dword [esp + 0x3c], 0x10
jb 0x597b24
mov eax, dword [esp + 0x28]
push eax
call fcn.005b28f2
add esp, 4
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x38]
push 4
push str.fold
push ecx
push 0
lea ecx, [esp + 0x34]
call fcn.0043b680
test eax, eax
jne 0x597b72
mov ecx, edi
call fcn.00580630
mov dword [edi + 0x304], 4
jmp 0x597b10
mov edx, dword [esp + 0x38]
push 7
push str.uncover
push edx
push 0
lea ecx, [esp + 0x34]
call fcn.0043b680
test eax, eax
jne 0x597bbf
mov ecx, dword [edi + 0x348]
mov eax, dword [ecx]
mov edx, dword [eax + 0x94]
push 0
call edx
mov ecx, dword [edi + 0x354]
mov eax, dword [ecx]
mov edx, dword [eax + 0x7c]
push 1
call edx
mov ecx, dword [edi + 0x354]
push 0x14
push 0
push 0x32
jmp 0x597b0b
lea eax, [esp + 0x24]
push str.cover
push eax
call fcn.0045d6d0
add esp, 8
test al, al
jne 0x597c3b
lea ecx, [esp + 0x24]
push 0x5f0930
push ecx
call fcn.0045d6d0
add esp, 8
test al, al
jne 0x597c3b
lea edx, [esp + 0x24]
push 0x5f4480
push edx
call fcn.0045d6d0
add esp, 8
test al, al
jne 0x597c3b
lea eax, [esp + 0x24]
push str.pour
push eax
call fcn.0045d6d0
add esp, 8
test al, al
jne 0x597c3b
mov ecx, dword [edi + 0x344]
mov edx, dword [ecx]
mov eax, dword [edx + 0x94]
push 0
call eax
mov ecx, dword [edi + 0x344]
push 1
call fcn.005ac030
jmp 0x597b10
add dword [edi + 0x374], 1
mov ecx, dword [edi + 0x39c]
test ecx, ecx
mov ebx, dword [edi + 0x374]
je 0x597c61
mov eax, dword [edi + 0x3a0]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597c66
call fcn.005b2af7
mov ecx, dword [edi + 0x39c]
mov edx, dword [ecx + ebx*4]
mov dword [esp + 0x1c], edx
xor ebx, ebx
mov ecx, dword [edi + 0x38c]
test ecx, ecx
je 0x597cc2
mov eax, dword [edi + 0x390]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x597cc2
cmp ebx, dword [esp + 0x1c]
je 0x597cbd
test ecx, ecx
je 0x597ca7
mov eax, dword [edi + 0x390]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597cac
call fcn.005b2af7
mov eax, dword [edi + 0x38c]
lea ecx, [eax + ebx*4]
push ecx
mov ecx, esi
call fcn.005932a0
add ebx, 1
jmp 0x597c75
mov eax, dword [esi + 8]
cmp dword [esi + 4], eax
mov dword [esp + 0x18], eax
jbe 0x597cd3
call fcn.005b2af7
mov ebx, dword [esi + 4]
cmp ebx, dword [esi + 8]
jbe 0x597ce0
call fcn.005b2af7
cmp esi, esi
je 0x597ce9
call fcn.005b2af7
mov eax, dword [esp + 0x18]
cmp ebx, eax
je 0x597cfd
push 0
push eax
push ebx
call fcn.00592ae0
add esp, 0xc
mov ecx, dword [esi + 4]
test ecx, ecx
jne 0x597d08
xor eax, eax
jmp 0x597d10
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
add eax, 1
cmp eax, 3
jbe 0x597d1f
mov eax, 3
jmp 0x597d32
test ecx, ecx
jne 0x597d27
xor eax, eax
jmp 0x597d2f
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
add eax, 1
push 0
push eax
mov ecx, esi
call fcn.00597790
mov ecx, dword [edi + 0x38c]
test ecx, ecx
je 0x597d57
mov eax, dword [edi + 0x390]
sub eax, ecx
sar eax, 2
cmp dword [esp + 0x1c], eax
jb 0x597d5c
call fcn.005b2af7
mov edx, dword [edi + 0x38c]
mov eax, dword [esp + 0x1c]
mov ebx, dword [esi + 8]
cmp dword [esi + 4], ebx
lea ecx, [edx + eax*4]
mov dword [esp + 0x18], ecx
jbe 0x597d7a
call fcn.005b2af7
lea eax, [ebx - 4]
cmp eax, dword [esi + 8]
mov dword [esp + 0x20], ebx
ja 0x597d8b
cmp eax, dword [esi + 4]
jae 0x597d90
call fcn.005b2af7
add ebx, 0xfffffffc
mov eax, esi
cmp ebx, dword [eax + 8]
jb 0x597d9f
call fcn.005b2af7
mov edx, dword [esp + 0x18]
mov eax, dword [edx]
mov dword [ebx], eax
mov ebx, dword [esi + 8]
cmp dword [esi + 4], ebx
jbe 0x597db4
call fcn.005b2af7
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
mov dword [esp + 0x1c], eax
jbe 0x597dc9
call fcn.005b2af7
mov eax, dword [esp + 0x1c]
cmp esi, esi
je 0x597dd6
call fcn.005b2af7
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x597de6
push 0
push ebx
push eax
call fcn.00592ae0
add esp, 0xc
mov ecx, dword [0x63e64c]
add ecx, 0x1e
mov dword [esp + 0x1c], ecx
xor ebx, ebx
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x597b10
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x597b10
test ecx, ecx
je 0x597e20
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597e25
call fcn.005b2af7
mov edx, dword [esi + 4]
mov eax, dword [edx + ebx*4]
mov ecx, dword [eax + 0x30]
mov dword [esp + 0x18], ecx
mov ecx, edx
test ecx, ecx
je 0x597e44
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597e49
call fcn.005b2af7
fldz
mov edx, dword [esp + 0x1c]
mov eax, dword [edi + 0x38]
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + ebx*4]
sub esp, 8
fstp qword [esp]
push 0
push 0
push 0
push edx
push eax
call fcn.005a8bd0
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x597e7e
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597e83
call fcn.005b2af7
fld qword [0x613ed8]
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 4]
mov ecx, dword [eax + ebx*4]
sub esp, 8
fstp qword [esp]
push 0
push 0
push 0
push 0
push edx
call fcn.005a8bd0
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x597eba
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597ebf
call fcn.005b2af7
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + ebx*4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x7c]
push 1
call eax
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x597ee1
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x597ee6
call fcn.005b2af7
mov ecx, dword [esi + 4]
mov edx, dword [ecx + ebx*4]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edx + 0x3c]
lea edx, [ecx + eax + 0x19]
mov dword [esp + 0x1c], edx
add ebx, 1
jmp 0x597df5