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

Disassembly:
sub esp, 0x120
mov eax, dword [0x8a3940]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x128]
xor cl, cl
mov dword [esp + 0x24], eax
xor dl, dl
mov eax, dword [esp + 0x134]
push ebx
mov ebx, dword [esp + 0x128]
mov dword [esp + 0x2c], eax
xor al, al
push ebp
mov ebp, dword [esp + 0x144]
push esi
mov esi, dword [esp + 0x138]
mov byte [esp + 0xf], al
mov byte [esp + 0xe], al
xor eax, eax
mov byte [esp + 0x16], cl
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x60], eax
mov dword [esp + 0x1c], esi
push edi
mov edi, dword [esp + 0x140]
lea eax, [ecx + esi]
mov esi, eax
mov dword [esp + 0x6c], eax
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x30], ebp
lea eax, [esi - 1]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x60], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x68], 0
mov byte [esp + 0x1b], dl
mov dword [esp + 0x40], esi
test ebx, ebx
jne 0x599dfe
cmp dword [esp + 0x34], ebx
jne 0x599dfe
test eax, eax
jne 0x599dfe
cmp edi, 0xfffffc19
jne 0x599dfe
cmp ecx, edi
jne 0x599dfe
push eax
push eax
push eax
push eax
push eax
push eax
push eax
call fcn.0058cb40
add esp, 0x1c
jmp 0x59ac02
mov edx, dword [esp + 0x148]
test edx, 0xe20f5a6f
je 0x599e17
mov eax, 0xfffffffd
jmp 0x59ac02
test ebx, ebx
je 0x59abfd
test eax, eax
je 0x59abfd
mov eax, dword [esp + 0x150]
test ebp, ebp
jne 0x599e3a
test eax, eax
jg 0x59abfd
test eax, eax
jns 0x599e48
mov eax, 0xfffffff1
jmp 0x59ac02
test edi, edi
jns 0x599e56
mov eax, 0xffffffe0
jmp 0x59ac02
test ecx, ecx
js 0x59abf6
cmp ecx, edi
jg 0x59abf6
mov ecx, dword [ebx]
cmp ecx, 0x50435245
je 0x599e88
cmp ecx, 0x45524350
mov eax, 0xfffffffc
mov edx, 0xffffffe3
cmove eax, edx
jmp 0x59ac02
test byte [ebx + 0xc], 1
jne 0x599e98
mov eax, 0xffffffe4
jmp 0x59ac02
mov ecx, dword [ebx + 8]
mov eax, 0
and ecx, 0x800
mov dword [esp + 0x3c], ecx
setne al
mov dword [esp + 0x2c], eax
mov dword [esp + 0xc0], eax
test edx, 0x8000000
je 0x599ec7
mov eax, 2
jmp 0x599ecf
mov eax, edx
shr eax, 0xf
and eax, 1
mov dword [esp + 0xfc], eax
test ecx, ecx
je 0x599f4e
test edx, 0x2000
jne 0x599f4e
lea eax, [esp + 0x24]
push eax
push edi
push dword [esp + 0x28]
call fcn.0059af90
add esp, 0xc
test eax, eax
je 0x599f2e
cmp dword [esp + 0x150], 2
jl 0x599f0c
mov ecx, dword [esp + 0x24]
mov dword [ebp], ecx
mov dword [ebp + 4], eax
cmp eax, 5
jg 0x599f24
cmp dword [esp + 0xfc], 1
mov eax, 0xffffffe7
jg 0x59ac02
mov eax, 0xfffffff6
jmp 0x59ac02
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x599f4e
cmp eax, edi
jge 0x599f4e
mov eax, esi
mov al, byte [eax]
and al, 0xc0
cmp al, 0x80
jne 0x599f4e
mov eax, 0xfffffff5
jmp 0x59ac02
movzx eax, word [ebx + 0x22]
mov ecx, 0x989680
movzx ebp, word [ebx + 0x24]
add eax, ebx
mov dword [esp + 0xa4], eax
mov edx, ecx
movzx eax, word [ebx + 0x26]
mov ebx, dword [ebx + 0x30]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x98], ebp
mov dword [esp + 0x4c], 0
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x11c], 0
mov dword [esp + 0x24], ebx
test eax, eax
je 0x599feb
mov ebx, dword [eax]
test bl, 1
je 0x599fb2
mov ebx, dword [eax + 4]
mov dword [esp + 0x4c], ebx
mov ebx, dword [eax]
test bl, 2
je 0x599fbe
mov ecx, dword [eax + 8]
mov dword [esp + 0x78], ecx
test bl, 0x10
je 0x599fca
mov edx, dword [eax + 0x14]
mov dword [esp + 0x7c], edx
test bl, 4
je 0x599fdd
mov eax, dword [eax + 0xc]
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x34]
test bl, 8
je 0x599fe7
mov ebx, dword [eax + 0x10]
jmp 0x599feb
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0xc]
test esi, 0x2000
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x40]
je 0x59a012
mov eax, dword [eax + 0x10]
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x78], ecx
test dword [esp + 0x28], 0x4000
je 0x59a028
mov eax, dword [eax + 0x14]
cmp eax, edx
cmovb edx, eax
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x1c]
test ebx, ebx
mov ecx, 0x78b360
mov dword [esp + 0xa0], 0
cmovne ecx, ebx
mov dword [esp + 0xd8], 0
mov dword [esp + 0x124], 0
mov eax, dword [edx + 8]
mov dword [esp + 0x58], eax
or eax, dword [esp + 0x148]
mov dword [esp + 0x40], eax
movzx eax, word [edx + 0x26]
imul ebp, eax
movzx eax, word [edx + 0x22]
mov dword [esp + 0x120], 0
mov dword [esp + 0x118], 0
mov dword [esp + 0xac], ecx
add ebp, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x108], eax
add ebp, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0xe4], ebp
mov ebp, edx
mov dword [esp + 0xe8], ebp
lea eax, [edx + edi]
mov edi, dword [esp + 0x58]
mov ebx, eax
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x148]
mov eax, edi
shr eax, 5
and eax, 1
mov dword [esp + 0xec], ebx
mov dword [esp + 0xcc], eax
mov eax, edi
shr eax, 0x1d
and eax, 1
mov dword [esp + 0xc8], eax
mov eax, edi
shr eax, 0x19
and eax, 1
mov dword [esp + 0xc4], eax
mov eax, edx
shr eax, 7
and eax, 1
mov dword [esp + 0xb8], eax
mov eax, edx
shr eax, 8
and eax, 1
mov dword [esp + 0xbc], eax
mov eax, edx
shr eax, 0xa
and eax, 1
mov dword [esp + 0xd0], eax
mov eax, edx
shr eax, 0x1c
and eax, 1
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0x28]
shr eax, 0xc
and eax, 1
mov dword [esp + 0xe0], eax
lea eax, [ecx + 0x100]
mov dword [esp + 0xb0], eax
lea eax, [ecx + 0x340]
mov dword [esp + 0xb4], eax
mov eax, edx
and eax, 0x1800000
je 0x59a1fa
cmp eax, 0x800000
je 0x59a1ed
cmp eax, 0x1000000
jne 0x59a287
mov dword [esp + 0xdc], 0
test edx, 0x700000
mov eax, edx
cmove eax, edi
and eax, 0x700000
cmp eax, 0x300000
ja 0x59a279
je 0x59a256
test eax, eax
je 0x59a236
cmp eax, 0x100000
je 0x59a216
cmp eax, 0x200000
jne 0x59a287
mov al, 0xa
mov dword [esp + 0x8c], 0
mov ecx, 1
mov byte [esp + 0xa8], al
mov dword [esp + 0x90], ecx
jmp 0x59a2a4
mov dword [esp + 0xdc], 1
jmp 0x59a18d
test edi, 0x1800000
je 0x59a182
mov eax, edi
shr eax, 0x17
and eax, 1
mov dword [esp + 0xdc], eax
jmp 0x59a18d
xor eax, eax
mov ecx, 1
mov dword [esp + 0x8c], eax
mov al, 0xd
mov dword [esp + 0x90], ecx
mov byte [esp + 0xa8], al
jmp 0x59a2a4
xor eax, eax
mov ecx, 1
mov dword [esp + 0x8c], eax
mov al, 0xa
mov dword [esp + 0x90], ecx
mov byte [esp + 0xa8], al
jmp 0x59a2a4
mov ecx, 2
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], ecx
mov word [esp + 0xa8], 0xa0d
jmp 0x59a2a4
cmp eax, 0x400000
je 0x59a298
cmp eax, 0x500000
je 0x59a291
mov eax, 0xffffffe9
jmp 0x59ac02
mov eax, 2
jmp 0x59a29d
mov eax, 1
mov dword [esp + 0x8c], eax
cmp dword [esp + 0xfc], 0
je 0x59a2c2
test dword [esp + 0x28], 0x200
je 0x59a2c2
mov eax, 0xfffffff3
jmp 0x59ac02
mov eax, 0xaaaaaaab
mul dword [esp + 0x150]
mov eax, 0x55555556
shr edx, 1
lea edi, [edx + edx*2]
lea ecx, [edi + edi]
mov dword [esp + 0x44], edi
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + 0x20]
test ax, ax
je 0x59a353
mov ecx, eax
mov eax, 0x55555556
imul edi
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jl 0x59a353
inc ecx
lea eax, [ecx + ecx*2]
mov dword [esp + 0x44], eax
shl eax, 2
push eax
call dword [0x8a3924]
mov edi, eax
add esp, 4
mov dword [esp + 0x80], edi
test edi, edi
jne 0x59a337
lea eax, [edi - 6]
jmp 0x59ac02
mov ebx, dword [esp + 0xec]
mov ebp, dword [esp + 0xe8]
mov dword [esp + 0x60], 1
mov dword [esp + 0x48], edi
jmp 0x59a364
mov eax, dword [esp + 0x30]
mov edi, eax
mov dword [esp + 0x80], edi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x84], eax
mov dword [esp + 0x104], 0
lea ecx, [eax + eax]
mov eax, 0x55555556
imul ecx
mov ecx, dword [esp + 0x48]
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x88], eax
test ecx, ecx
je 0x59a3f9
mov eax, dword [esp + 0x44]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x1c]
mov edx, ecx
movzx eax, word [eax + 0x1e]
shl eax, 2
sub edx, eax
mov eax, dword [esp + 0x48]
add eax, 8
cmp edx, eax
cmovb edx, eax
sub ecx, 4
cmp ecx, edx
jb 0x59a3d7
mov dword [ecx], 0xffffffff
sub ecx, 4
cmp ecx, edx
jae 0x59a3c3
mov edi, dword [esp + 0x80]
mov dword [edi + 4], 0xffffffff
mov eax, dword [esp + 0x80]
mov dword [eax], 0xffffffff
mov ebx, dword [esp + 0xec]
mov ebp, dword [esp + 0xe8]
test byte [esp + 0x40], 0x10
mov edx, dword [esp + 0x1c]
jne 0x59a45f
mov eax, dword [edx + 0xc]
test al, 0x10
je 0x59a437
mov ch, byte [edx + 0x18]
mov dword [esp + 0x50], 1
mov cl, ch
mov byte [esp + 0x13], ch
mov byte [esp + 0x1a], cl
test al, 0x20
je 0x59a45f
movzx eax, ch
mov ecx, dword [esp + 0xb0]
mov al, byte [eax + ecx]
mov byte [esp + 0x13], al
jmp 0x59a466
test dword [esp + 0x28], 0x100
jne 0x59a45f
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x59a45f
test byte [eax + 4], 1
mov ecx, dword [esp + 0xb0]
je 0x59a466
add eax, 8
mov dword [esp + 0x64], eax
jmp 0x59a466
mov ecx, dword [esp + 0xb0]
mov eax, dword [edx + 0xc]
test al, 0x40
je 0x59a490
mov dh, byte [edx + 0x1a]
mov dword [esp + 0x68], 1
mov dl, dh
mov byte [esp + 0x12], dh
mov byte [esp + 0x1b], dl
test al, al
jns 0x59a490
movzx eax, dh
mov al, byte [eax + ecx]
mov byte [esp + 0x12], al
mov edx, dword [esp + 0x14]
nop dword [eax]
nop dword [eax + eax]
test dword [esp + 0x58], 0x40000
mov edi, edx
je 0x59a5cf
cmp dword [esp + 0x3c], 0
mov edi, esi
je 0x59a55a
cmp esi, ebx
jae 0x59a5cf
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x14]
test edx, edx
je 0x59a507
cmp edi, ebx
jae 0x59a53e
push dword [esp + 0x2c]
lea eax, [esp + 0x94]
push eax
push ebx
push edx
push edi
call fcn.0059ac50
add esp, 0x14
test eax, eax
jne 0x59a5c8
mov ebx, dword [esp + 0xec]
mov edx, dword [esp + 0x8c]
jmp 0x59a53a
mov ecx, dword [esp + 0x90]
mov eax, ebx
sub eax, ecx
cmp edi, eax
ja 0x59a53a
mov al, byte [edi]
cmp al, byte [esp + 0xa8]
jne 0x59a53a
cmp ecx, 1
je 0x59a5c8
mov al, byte [edi + 1]
cmp al, byte [esp + 0xa9]
je 0x59a5c8
mov ecx, dword [esp + 0x14]
inc edi
cmp edi, ecx
jae 0x59a550
mov al, byte [edi]
and al, 0xc0
cmp al, 0x80
jne 0x59a550
inc edi
cmp edi, ecx
jb 0x59a543
cmp edi, ebx
jb 0x59a4d0
jmp 0x59a5c8
cmp esi, ebx
jae 0x59a5cf
mov edx, dword [esp + 0x8c]
test edx, edx
je 0x59a598
cmp edi, ebx
jae 0x59a5c3
push dword [esp + 0x2c]
lea eax, [esp + 0x94]
push eax
push ebx
push edx
push edi
call fcn.0059ac50
add esp, 0x14
test eax, eax
jne 0x59a5c8
mov ebx, dword [esp + 0xec]
mov edx, dword [esp + 0x8c]
jmp 0x59a5c3
mov ecx, dword [esp + 0x90]
mov eax, ebx
sub eax, ecx
cmp edi, eax
ja 0x59a5c3
mov al, byte [edi]
cmp al, byte [esp + 0xa8]
jne 0x59a5c3
cmp ecx, 1
je 0x59a5c8
mov al, byte [edi + 1]
cmp al, byte [esp + 0xa9]
je 0x59a5c8
inc edi
cmp edi, ebx
jb 0x59a565
mov ebp, dword [esp + 0xe8]
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx + 8]
or eax, dword [esp + 0x148]
test eax, 0x4000000
jne 0x59a7c7
cmp dword [esp + 0x50], 0
je 0x59a632
cmp esi, edi
jae 0x59a7c7
mov cl, byte [esp + 0x1a]
mov dl, byte [esp + 0x13]
cmp cl, dl
je 0x59a620
mov al, byte [esi]
cmp al, cl
je 0x59a7c7
cmp al, dl
je 0x59a7c7
inc esi
cmp esi, edi
jb 0x59a603
jmp 0x59a7c7
cmp byte [esi], cl
je 0x59a7c7
inc esi
cmp esi, edi
jb 0x59a620
jmp 0x59a7c7
test dword [esp + 0x28], 0x100
je 0x59a779
mov eax, dword [esp + 0x38]
add eax, ebp
cmp esi, eax
jbe 0x59a7c7
cmp esi, edi
jae 0x59a756
cmp dword [esp + 0x3c], 0
je 0x59a6e6
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x59a698
cmp esi, ebp
jbe 0x59a6ce
push dword [esp + 0x2c]
lea ecx, [esp + 0x94]
push ecx
push ebp
push eax
push esi
call fcn.0059adb0
add esp, 0x14
test eax, eax
jne 0x59a756
mov ebp, dword [esp + 0xe8]
jmp 0x59a6ce
mov edx, dword [esp + 0x90]
lea eax, [edx + ebp]
cmp esi, eax
jb 0x59a6ce
mov ecx, esi
sub ecx, edx
mov al, byte [ecx]
cmp al, byte [esp + 0xa8]
jne 0x59a6ce
cmp edx, 1
je 0x59a756
mov al, byte [ecx + 1]
cmp al, byte [esp + 0xa9]
je 0x59a756
inc esi
cmp esi, edi
jae 0x59a756
mov al, byte [esi]
and al, 0xc0
cmp al, 0x80
jne 0x59a661
inc esi
cmp esi, edi
jb 0x59a6d7
jmp 0x59a756
mov eax, dword [esp + 0x8c]
nop dword [eax]
test eax, eax
je 0x59a71c
cmp esi, ebp
jbe 0x59a751
push dword [esp + 0x2c]
lea ecx, [esp + 0x94]
push ecx
push ebp
push eax
push esi
call fcn.0059adb0
add esp, 0x14
test eax, eax
jne 0x59a756
mov ebp, dword [esp + 0xe8]
jmp 0x59a74a
mov edx, dword [esp + 0x90]
lea eax, [edx + ebp]
cmp esi, eax
jb 0x59a74a
mov ecx, esi
sub ecx, edx
mov al, byte [ecx]
cmp al, byte [esp + 0xa8]
jne 0x59a74a
cmp edx, 1
je 0x59a756
mov al, byte [ecx + 1]
cmp al, byte [esp + 0xa9]
je 0x59a756
mov eax, dword [esp + 0x8c]
inc esi
cmp esi, edi
jb 0x59a6f0
cmp byte [esi - 1], 0xd
jne 0x59a7c7
mov eax, dword [esp + 0x8c]
cmp eax, 1
je 0x59a76d
cmp eax, 2
jne 0x59a7c7
cmp esi, edi
jae 0x59a7c7
cmp byte [esi], 0xa
jne 0x59a7c7
inc esi
jmp 0x59a7c7
mov ebp, dword [esp + 0x64]
test ebp, ebp
je 0x59a7c7
cmp esi, edi
jae 0x59a7c7
mov ebx, dword [esp + 0x3c]
nop dword [eax]
movzx edx, byte [esi]
mov eax, 1
mov ecx, edx
shr edx, 3
and ecx, 7
shl eax, cl
test byte [edx + ebp], al
jne 0x59a7c3
inc esi
test ebx, ebx
je 0x59a7bf
cmp esi, edi
jae 0x59a7c3
mov al, byte [esi]
and al, 0xc0
cmp al, 0x80
jne 0x59a7bf
inc esi
cmp esi, edi
jb 0x59a7b0
jmp 0x59a7c3
cmp esi, edi
jb 0x59a790
mov ebx, dword [esp + 0x1c]
mov eax, dword [ebx + 8]
or eax, dword [esp + 0x148]
test eax, 0x4000000
jne 0x59a870
cmp dword [esp + 0xfc], 0
jne 0x59a870
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x14]
test ecx, ecx
je 0x59a805
test byte [ecx + 4], 2
je 0x59a805
mov eax, edx
sub eax, esi
cmp eax, dword [ecx + 0x28]
jb case.0x59a901.996
cmp dword [esp + 0x68], 0
je 0x59a870
mov eax, edx
sub eax, esi
cmp eax, 0x3e8
jge 0x59a870
mov eax, dword [esp + 0x50]
lea ecx, [esi + eax]
cmp ecx, dword [esp + 0x54]
jbe 0x59a870
cmp ecx, edx
jae case.0x59a901.996
mov ah, byte [esp + 0x1b]
cmp ah, byte [esp + 0x12]
je 0x59a850
mov al, byte [ecx]
mov ebx, ecx
inc ecx
mov dword [esp + 0x54], ebx
cmp al, ah
je 0x59a868
cmp al, byte [esp + 0x12]
je 0x59a868
cmp ecx, edx
jb 0x59a832
xor ebp, ebp
jmp 0x59aa59
mov al, byte [ecx]
mov ebx, ecx
mov dword [esp + 0x54], ecx
inc ecx
cmp al, ah
je 0x59a868
cmp ecx, edx
jb 0x59a850
xor ebp, ebp
jmp 0x59aa59
cmp ebx, edx
jae case.0x59a901.996
mov ebx, dword [esp + 0x1c]
push 0
push 0
lea eax, [esp + 0x7c]
mov dword [esp + 0xf8], esi
push eax
push 2
push esi
push dword [esp + 0xf8]
mov dword [esp + 0x110], esi
push esi
mov dword [esp + 0x90], 0
mov dword [esp + 0x128], 0
mov dword [esp + 0x11c], 0
mov dword [esp + 0xb8], 0
call fcn.0058cb40
add esp, 0x1c
mov ebp, eax
cmp dword [esp + 0xd8], 0
je 0x59a8e8
cmp dword [esp + 0x5c], 0
jne 0x59a8e8
mov eax, dword [esp + 0xf8]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x70], esi
test ebp, ebp
jg 0x59aa44
je case.0x59a901.995
lea eax, [ebp + 0x3e4]
cmp eax, 4
ja case.default.0x59a901
jmp dword [eax*4 + 0x59ac1c]
mov eax, dword [esp + 0x9c]
mov edi, esi
mov dword [esp + 0xa0], eax
jmp 0x59a94f
mov edi, dword [esp + 0xf0]
cmp edi, esi
ja 0x59a94f
cmp dword [esp + 0x3c], 0
lea edi, [esi + 1]
mov dword [esp + 0xa0], 0
je 0x59a94f
mov edx, dword [esp + 0x14]
cmp edi, edx
jae 0x59a94f
mov al, byte [edi]
and al, 0xc0
cmp al, 0x80
jne 0x59a94f
inc edi
cmp edi, edx
jb 0x59a942
mov eax, dword [esp + 0x8c]
xor ebp, ebp
test dword [esp + 0x58], 0x40000
mov ebx, dword [esp + 0xec]
je 0x59a9a2
test eax, eax
je 0x59aa0d
cmp esi, ebx
jae 0x59a9a2
push dword [esp + 0x2c]
lea ecx, [esp + 0x94]
push ecx
push ebx
push eax
push esi
call fcn.0059ac50
add esp, 0x14
test eax, eax
jne 0x59aa59
mov ebx, dword [esp + 0xec]
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x90]
test byte [esp + 0x40], 0x10
mov esi, edi
jne 0x59aa59
mov edx, dword [esp + 0x14]
cmp edi, edx
ja 0x59aa59
cmp edi, dword [esp + 0x6c]
jbe 0x59a9f6
cmp byte [edi - 1], 0xd
jne 0x59a9f6
cmp edi, edx
jae 0x59a9f6
cmp byte [edi], 0xa
jne 0x59a9f6
mov ebp, dword [esp + 0x1c]
test dword [ebp + 0xc], 0x800
jne 0x59a9f6
cmp eax, 1
je 0x59a9f3
cmp eax, 2
je 0x59a9f3
cmp ecx, 2
jne 0x59a9f6
lea esi, [edi + 1]
mov ebp, dword [esp + 0xe8]
mov dword [esp + 0x120], 0
jmp 0x59a4a0
mov ecx, dword [esp + 0x90]
mov eax, ebx
sub eax, ecx
cmp esi, eax
ja 0x59aa38
mov al, byte [esi]
cmp al, byte [esp + 0xa8]
jne 0x59aa38
cmp ecx, 1
je 0x59aa59
mov al, byte [esi + 1]
cmp al, byte [esp + 0xa9]
je 0x59aa59
mov eax, dword [esp + 0x8c]
jmp 0x59a9a9
cmp ebp, 1
je 0x59aae7
cmp ebp, 0xfffffc19
je 0x59aae7
cmp dword [esp + 0x60], 0
je 0x59aa70
push dword [esp + 0x80]
call dword [0x8a3928]
add esp, 4
test ebp, ebp
je 0x59aa80
cmp ebp, 0xfffffff4
je 0x59aa80
mov eax, ebp
jmp 0x59ac02
mov ebx, dword [esp + 0x70]
test ebx, ebx
je 0x59aabe
mov edx, dword [esp + 0x150]
cmp edx, 1
jle 0x59aab7
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x20]
sub eax, esi
mov dword [ecx], eax
mov eax, dword [esp + 0x14]
sub eax, esi
mov dword [ecx + 4], eax
cmp edx, 2
jle 0x59aab7
sub ebx, esi
mov dword [ecx + 8], ebx
mov eax, 0xfffffff4
jmp 0x59aac1
or eax, 0xffffffff
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x59ac02
test byte [ecx], 0x20
je 0x59ac02
mov edx, dword [ecx + 0x18]
mov ecx, dword [esp + 0x124]
mov dword [edx], ecx
jmp 0x59ac02
cmp dword [esp + 0x60], 0
mov edi, dword [esp + 0x24]
je 0x59ab38
mov esi, dword [esp + 0x80]
cmp edi, 4
jl 0x59ab1a
lea eax, [edi*4 - 8]
push eax
lea eax, [esi + 8]
push eax
mov eax, dword [esp + 0x38]
add eax, 8
push eax
call fcn.0059ce60
add esp, 0xc
cmp dword [esp + 0x100], edi
jle 0x59ab2e
or dword [esp + 0x104], 0x10000
push esi
call dword [0x8a3928]
add esp, 4
test dword [esp + 0x104], 0x10000
mov ecx, dword [esp + 0x100]
je 0x59ab54
cmp ecx, edi
jl 0x59ab54
xor esi, esi
jmp 0x59ab5d
mov eax, ecx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
movzx edi, word [ebx + 0x1e]
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x30]
sar eax, 1
cmp eax, edi
jg 0x59abaa
test edx, edx
je 0x59abaa
lea eax, [edi*2 + 2]
cmp eax, dword [esp + 0x150]
lea edi, [edx + ecx*4]
cmovg eax, dword [esp + 0x150]
xor ebx, ebx
lea eax, [edx + eax*4]
mov ecx, eax
sub ecx, edi
add ecx, 3
shr ecx, 2
cmp edi, eax
cmova ecx, ebx
test ecx, ecx
je 0x59abaa
or eax, 0xffffffff
rep stosd dword es:[edi], eax
cmp dword [esp + 0x150], 2
jge 0x59abb8
xor esi, esi
jmp 0x59abd9
mov eax, dword [esp + 0xf0]
sub eax, dword [esp + 0xe8]
mov dword [edx], eax
mov eax, dword [esp + 0xf4]
sub eax, dword [esp + 0xe8]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x59abf2
test byte [eax], 0x20
je 0x59abf2
mov edx, dword [eax + 0x18]
mov ecx, dword [esp + 0x120]
mov dword [edx], ecx
mov eax, esi
jmp 0x59ac02
mov eax, 0xffffffe8
jmp 0x59ac02
mov eax, 0xfffffffe
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0059bb21
add esp, 0x120
ret