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

Disassembly:
sub esp, 0xbc
push ebx
mov ebx, dword [esp + 0xc4]
push esi
mov dword [esp + 0x14], 0
mov eax, dword [ebx]
mov esi, dword [ebx + 8]
mov eax, dword [eax]
mov dword [esp + 0x40], eax
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
xor ecx, ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], ecx
cmp dword [eax + 0x24], ecx
je 0x598a23
mov eax, dword [eax + 0xc]
pop esi
pop ebx
add esp, 0xbc
ret
mov eax, dword [esi + 0x2c]
mov edx, 0x18
push ebp
mov ebp, dword [esp + 0xd4]
test al, 0x20
mov dword [esp + 0x40], eax
mov eax, 0x1bf
push edi
cmove edx, eax
mov edi, dword [ebp + 0x38]
test edi, 0x104
je 0x598a69
mov ecx, edx
mov eax, edi
and ecx, 0xffffffc3
test al, 4
cmove ecx, edx
mov edx, ecx
test edi, 0x100
je 0x598a69
and edx, 0xffffff7c
movzx eax, word [esi + 0x1a]
movzx ecx, word [esi + 0x18]
mov dword [esp + 0x54], eax
movzx eax, word [esi + 0x1c]
mov dword [esp + 0x58], eax
movzx eax, word [esi + 0x32]
mov dword [esp + 0x5c], eax
movzx eax, word [esi + 0x30]
mov dword [esp + 0x38], eax
mov eax, dword [esi]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x50], eax
movzx eax, word [esi + 0x16]
mov edi, eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xd4]
push ebp
push edx
mov dword [esp + 0x6c], edi
movzx edi, cx
push edi
push dword [eax + 0x2c]
lea eax, [esp + 0x7c]
mov dword [esp + 0x50], ecx
push dword [ebx + 4]
mov dword [esp + 0x2c], edi
push eax
call fcn.0059c9f0
mov ebx, eax
add esp, 0x18
xor eax, eax
mov dword [esp + 0x20], ebx
mov word [esi + 0x12], ax
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov eax, ecx
mov dword [esp + 0x60], eax
cmp ax, 0xa
jg 0x598af8
mov dword [esp + 0x30], 0
jmp 0x598b11
movsx eax, cx
cdq
push edx
push eax
call fcn.00557460
add esp, 8
sub ax, 0x21
movzx eax, ax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xdc]
mov ecx, 0x100
mov dword [esp + 0x28], eax
test ebx, ebx
je 0x59917e
movzx edx, word [ebx + 0xc]
lea ebp, [ebx + 0xa]
mov eax, edx
mov dword [esp + 0x10], 0
mov dword [esp + 0x24], eax
cmp ax, cx
je 0x598b49
test byte [ebp], 0x80
je 0x598b9e
mov edi, dword [esp + 0xd8]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi + 4]
movsx ecx, word [eax + ecx*2]
test ecx, ecx
js 0x598b97
mov eax, dword [edi + 0xc]
add ecx, ecx
mov eax, dword [eax + 4]
test dword [eax + ecx*8 + 4], 0xf
je 0x598ba5
mov ebp, edi
lea eax, [esp + 0x6c]
push eax
call fcn.0059cb00
add esp, 4
mov ebx, eax
cmp dword [esp + 0x1c], 0
mov ecx, 0x100
mov dword [esp + 0x20], ebx
je 0x598b21
jmp 0x59917e
cmp ecx, 0xffffffff
je 0x598b71
jmp 0x598ba5
mov edi, dword [esp + 0xd8]
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
and ecx, dword [ebx + 0x20]
and eax, dword [ebx + 0x24]
or ecx, eax
jne 0x59916b
mov eax, 0x100
test word [ebp], ax
je 0x598bcd
cmp edx, 0x10
je 0x59916b
mov eax, dword [esp + 0xd4]
mov cl, byte [eax + 0x24]
test cl, 0x58
je 0x598c12
mov eax, dword [ebx]
mov edx, dword [eax + 4]
test dl, 3
je 0x59916b
mov edi, dword [esp + 0xd4]
mov eax, dword [eax + 0x24]
cmp eax, dword [edi + 0x2c]
mov edi, dword [esp + 0xd8]
jne 0x598b71
test cl, 0x18
je 0x598c12
test dl, 2
jne 0x598b71
cmp byte [edi + 0x36], 0
je 0x598c30
movzx eax, word [edi + 0x32]
dec eax
cmp dword [esp + 0x18], eax
jne 0x598c30
mov eax, dword [esp + 0xd0]
or byte [eax + 0x10], 2
jmp 0x598c3b
mov eax, dword [esp + 0xd0]
or byte [eax + 0x10], 1
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x38]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x54]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x58]
mov word [esi + 0x1c], ax
movzx eax, cx
mov word [esi + 0x30], cx
cmp ax, word [esi + 0x34]
jb 0x598c82
inc eax
push eax
push esi
push dword [esp + 0x3c]
call fcn.0059aa70
add esp, 0xc
test eax, eax
jne 0x599177
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edi, dword [esp + 0x4c]
mov dword [eax + ecx*4], ebx
mov ax, word [esi + 0x30]
mov ecx, dword [esi + 8]
inc ax
mov word [esi + 0x30], ax
not ecx
movzx ebx, ax
mov eax, dword [esp + 0x20]
or edi, dword [eax + 0x20]
mov edx, dword [eax + 0x24]
and edi, ecx
mov eax, dword [esi + 0xc]
or edx, dword [esp + 0x50]
not eax
and edx, eax
mov dword [esi], edi
mov eax, dword [esp + 0x24]
mov dword [esi + 4], edx
test al, 1
je 0x598dca
mov edx, dword [esp + 0x20]
mov edx, dword [edx]
test dword [edx + 4], 0x1000
je 0x598d48
lea edi, [ebx - 1]
mov ebp, 0x2e
xor ecx, ecx
mov dword [esp + 0x10], ebp
test edi, edi
jle 0x598d69
mov ebx, dword [esi + 0x38]
nop
mov eax, dword [ebx + ecx*4]
test eax, eax
je 0x598d06
cmp dword [eax], edx
mov dword [esp + 0x10], 0
cmove ebp, dword [esp + 0x10]
inc ecx
cmp ecx, edi
jl 0x598cf0
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0xd8]
test byte [ebp + 0x38], 0x80
je 0x598db6
cmp word [esp + 0x30], 0xa
jl 0x598db6
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0x18]
movzx edi, cx
movzx ebx, word [eax + edx*2]
cmp di, 0xa
jg 0x598d6d
xor eax, eax
jmp 0x598d82
mov eax, dword [edx + 0x14]
test eax, eax
je 0x598d0f
mov eax, dword [eax]
test eax, eax
je 0x598d0f
cdq
push edx
push eax
call fcn.00557460
movsx ecx, ax
add esp, 8
mov dword [esp + 0x10], ecx
jmp 0x598d13
mov ecx, ebp
jmp 0x598d13
movsx eax, di
cdq
push edx
push eax
call fcn.00557460
add esp, 8
sub ax, 0x21
movzx eax, ax
sub eax, edi
sub eax, dword [esp + 0x30]
add eax, 0xa
add eax, ebx
test ax, ax
jns 0x598db6
cmp word [esp + 0x28], 2
jge 0x598b73
mov eax, dword [esp + 0x34]
test dword [eax + 0x50], 0x20000
jne 0x598b73
or dword [esi + 0x2c], 0x100000
or dword [esi + 0x2c], 4
mov ebx, dword [esi + 0x2c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
jmp 0x598f3b
test al, 0x82
je 0x598e5f
mov ebp, dword [esp + 0xd8]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 4]
movsx eax, word [eax + ecx*2]
mov ecx, dword [esi + 0x2c]
or ecx, 1
mov dword [esi + 0x2c], ecx
cmp eax, 0xffffffff
je 0x598e30
mov edx, ecx
mov ebx, ecx
test eax, eax
js 0x598e3d
cmp word [esp + 0x28], 0
jne 0x598e3d
movzx eax, word [ebp + 0x32]
mov edi, eax
dec eax
cmp dword [esp + 0x18], eax
jne 0x598e3d
test byte [ebp + 0x38], 8
jne 0x598e30
cmp edi, 1
jne 0x598e28
cmp byte [ebp + 0x36], 0
je 0x598e28
cmp word [esp + 0x24], 2
je 0x598e30
or ebx, 0x10000
jmp 0x598e38
mov ebx, ecx
or ebx, 0x1000
mov edx, ebx
mov dword [esi + 0x2c], ebx
cmp byte [esp + 0x85], 1
jbe 0x598e52
mov ebx, edx
or ebx, 0x200000
mov dword [esi + 0x2c], ebx
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
jmp 0x598f3b
mov edi, dword [esp + 0x20]
test eax, 0x100
je 0x598e7c
mov ebx, dword [esi + 0x2c]
mov edx, dword [esp + 0x14]
or ebx, 8
mov dword [esi + 0x2c], ebx
jmp 0x598f34
mov eax, dword [esp + 0xd4]
mov edx, dword [esp + 0xd8]
push edi
push dword [esp + 0x1c]
push edx
push dword [eax + 0x2c]
push dword [esp + 0x58]
call fcn.0059c750
mov ebx, dword [esi + 0x2c]
add esp, 0x14
test byte [esp + 0x24], 0x24
je 0x598f0e
or ebx, 0x22
mov word [esi + 0x1a], ax
xor ecx, ecx
mov dword [esi + 0x2c], ebx
mov eax, 0x100
mov dword [esp + 0x14], edi
mov dword [esp + 0x2c], ecx
test word [ebp], ax
je 0x598f08
movzx eax, word [esi + 0x30]
lea ebx, [edi + 0x30]
inc eax
mov dword [esp + 0x2c], ebx
push eax
push esi
push dword [esp + 0x3c]
call fcn.0059aa70
add esp, 0xc
test eax, eax
jne 0x599177
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov dword [eax + ecx*4], ebx
mov eax, 1
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x10
mov ebx, dword [esi + 0x2c]
mov word [esi + 0x1c], ax
mov edx, dword [esp + 0x14]
jmp 0x598f34
or ebx, 0x12
mov word [esi + 0x1c], ax
mov dword [esi + 0x2c], ebx
mov dword [esp + 0x2c], edi
test bl, 0x20
je 0x598f2e
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
mov edx, dword [eax + ecx*4 - 8]
jmp 0x598f30
xor edx, edx
mov dword [esp + 0x14], edx
mov ebp, dword [esp + 0xd8]
test bl, 2
je 0x598fe0
movzx eax, word [esi + 0x16]
movsx edi, ax
test edx, edx
je 0x598f65
movzx ecx, word [edx + 8]
test cx, cx
jg 0x598f5c
add eax, ecx
jmp 0x598f65
test byte [edx + 0xa], 0x80
jne 0x598f65
sub eax, 0x14
mov ebp, dword [esp + 0x2c]
movzx ecx, ax
test ebp, ebp
je 0x598f89
movzx edx, word [ebp + 8]
test dx, dx
jg 0x598f7d
add eax, edx
jmp 0x598f86
test byte [ebp + 0xa], 0x80
jne 0x598f89
add eax, 0xffffffec
movzx ecx, ax
mov eax, dword [esp + 0x14]
movzx edx, cx
test eax, eax
je 0x598fac
cmp word [eax + 8], 0
jle 0x598fac
test ebp, ebp
je 0x598fac
cmp word [ebp + 8], 0
jle 0x598fac
lea eax, [ecx - 0x14]
movzx edx, ax
xor eax, eax
cmp dword [esp + 0x14], eax
setne al
sub edi, eax
xor eax, eax
test ebp, ebp
setne al
sub edi, eax
cmp dx, 0xa
mov eax, 0xa
cmovl edx, eax
movzx eax, dx
cmp eax, edi
mov edx, eax
movzx eax, di
cmovge edx, eax
movzx eax, dx
mov ebp, eax
jmp 0x599039
inc word [esi + 0x18]
movzx ecx, word [edi + 8]
movzx edx, word [esi + 0x18]
test cx, cx
jg 0x59900e
mov eax, dword [ebp + 4]
mov edi, dword [esp + 0x18]
cmp word [eax + edi*2], 0
jl 0x59900e
sub ecx, dword [esp + 0x10]
add cx, word [esi + 0x16]
movzx eax, cx
mov ebp, eax
jmp 0x599039
mov eax, dword [ebp + 8]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 - 2]
add cx, word [esi + 0x16]
test dword [esp + 0x24], 0x100
movzx eax, cx
mov ecx, eax
mov word [esi + 0x16], ax
mov ebp, eax
je 0x59903d
lea eax, [ecx + 0xa]
movzx ebp, ax
mov word [esi + 0x16], ax
mov edx, dword [esp + 0xd8]
movzx eax, bp
mov dword [esp + 0x20], eax
lea eax, [ebp + 0x10]
movzx ecx, ax
mov eax, dword [edx + 0x38]
and eax, 3
mov dword [esp + 0x24], ecx
cmp al, 3
jne 0x599067
movzx edx, cx
movzx eax, cx
jmp 0x599090
mov eax, dword [esp + 0xd4]
movsx ecx, word [edx + 0x30]
mov eax, dword [eax + 0x10]
movsx edi, word [eax + 0x28]
mov eax, ecx
shl eax, 4
sub eax, ecx
cdq
idiv edi
inc eax
add eax, ebp
movzx edx, ax
mov eax, dword [esp + 0x24]
movzx eax, ax
push edx
push dword [esp + 0x34]
movzx edi, ax
call fcn.00557500
add esp, 8
movzx ecx, ax
test ebx, 0x4000140
jne 0x5990b8
push edi
push eax
call fcn.00557500
add esp, 8
movzx ecx, ax
mov eax, dword [esp + 0x10]
push dword [esp + 0x60]
mov ebx, dword [esp + 0xd4]
movzx edi, ax
push esi
lea eax, [ecx + edi]
add eax, dword [esp + 0x30]
mov word [esi + 0x14], ax
lea eax, [edi + ebp]
add eax, dword [esp + 0x30]
mov word [esi + 0x16], ax
push dword [ebx + 4]
call fcn.0059a810
push esi
push ebx
call fcn.0059a560
mov ecx, dword [esp + 0x78]
add esp, 0x14
mov ebp, dword [esp + 0xd8]
movzx edx, cx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
test al, 2
movzx ecx, cx
cmove edx, ecx
mov word [esi + 0x16], dx
test al, 0x10
jne 0x59915e
movzx ecx, word [esi + 0x18]
cmp cx, word [ebp + 0x34]
jae 0x59915e
cmp cx, word [ebp + 0x32]
jb 0x599135
mov eax, dword [ebp + 0x38]
and al, 3
cmp al, 2
je 0x59915e
cmp ecx, 3
jbe 0x599146
push dword [esp + 0x48]
call fcn.00562540
add esp, 4
mov eax, dword [esp + 0x28]
add eax, edi
push eax
push ebp
push dword [esp + 0xdc]
push ebx
call fcn.005989e0
add esp, 0x10
mov eax, dword [esp + 0x3c]
mov word [esi + 0x16], ax
jmp 0x598b73
mov ebp, dword [esp + 0xd8]
jmp 0x598b73
mov ebp, dword [esp + 0xd8]
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x5c]
mov dword [esi], eax
mov eax, dword [esp + 0x50]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x54]
mov word [esi + 0x1a], ax
mov eax, dword [esp + 0x58]
mov word [esi + 0x1c], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x3c]
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x38]
mov word [esi + 0x18], bx
mov word [esi + 0x32], cx
mov word [esi + 0x30], ax
cmp bx, cx
jne 0x5992b9
mov edi, dword [esp + 0x18]
movzx ecx, word [ebp + 0x32]
lea eax, [edi + 1]
cmp eax, ecx
jae 0x5992b9
mov eax, dword [esp + 0x38]
movzx edx, ax
cmp bx, dx
jne 0x5992b9
mov eax, dword [ebp + 0x38]
test al, 0x40
jne 0x5992b9
test al, al
jns 0x5992b9
mov ecx, dword [esp + 0x34]
test dword [ecx + 0x50], 0x4000
jne 0x5992b9
mov eax, dword [ebp + 8]
cmp word [eax + edi*2 + 2], 0x2a
jl 0x5992b9
inc edx
push edx
push esi
push ecx
call fcn.0059aa70
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x5992bd
movzx ecx, word [esi + 0x30]
mov eax, dword [esi + 0x38]
inc word [esi + 0x18]
inc word [esi + 0x32]
mov edx, dword [esp + 0x18]
mov dword [eax + ecx*4], edi
inc word [esi + 0x30]
or dword [esi + 0x2c], 0x8000
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0xd0]
mov cx, word [eax + edx*2]
sub cx, word [eax + edx*2 + 2]
movzx eax, cx
mov ecx, dword [esp + 0x28]
sub word [esi + 0x16], ax
add ecx, 5
add eax, ecx
push eax
push ebp
push dword [esp + 0xdc]
push ebx
call fcn.005989e0
mov eax, dword [esp + 0x4c]
add esp, 0x10
mov word [esi + 0x16], ax
mov eax, dword [esp + 0x40]
mov word [esi + 0x18], ax
mov eax, dword [esp + 0x5c]
mov word [esi + 0x32], ax
mov eax, dword [esp + 0x44]
mov dword [esi + 0x2c], eax
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0xbc
ret
mov edi, dword [esp + 0x1c]
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0xbc
ret