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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x4fc
mov eax, dword [0x628560]
xor eax, esp
mov dword [esp + 0x4f8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esi]
mov ecx, dword [eax*8 + 0x5f3538]
mov edx, dword [eax*8 + 0x5f353c]
mov dword [esp + 0x28], ecx
movsx ecx, word [esi + 0x40]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
lea edx, [ecx + ecx]
push ebx
mov ebx, edx
mov edx, eax
sub edx, ebx
mov dword [esp + 0x40], edx
movsx edx, word [esi + 0x42]
lea ebx, [edx + edx]
sub eax, ebx
cmp dword [edi + 0x1f0c], 0
mov dword [esp + 0x44], eax
je 0x5b6457
cmp dword [esp + 0x1c], 3
mov dword [esp + 0x5c], 1
jle 0x5b645f
mov dword [esp + 0x5c], 0
cmp dword [ebp + 8], 0
movsx eax, word [esi + 0x4e]
movsx ebx, word [esi + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x48]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x4c], 0xffffffff
je 0x5b6579
cmp dword [edi + 0x1f08], 3
jge 0x5b6579
mov eax, dword [edi + 0x1f34]
cmp ecx, eax
jge 0x5b64a5
mov dword [esp + 0x50], eax
jmp 0x5b64b7
mov eax, dword [edi + 0x1f3c]
cmp ecx, eax
mov dword [esp + 0x50], eax
jg 0x5b64b7
mov dword [esp + 0x50], ecx
mov eax, dword [edi + 0x1f38]
cmp edx, eax
mov ecx, dword [edi + 0x1f40]
jge 0x5b64cd
mov dword [esp + 0x38], eax
jmp 0x5b64d9
cmp edx, ecx
mov dword [esp + 0x38], ecx
jg 0x5b64d9
mov dword [esp + 0x38], edx
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x38]
sub ecx, dword [esp + 0x14]
mov edx, eax
sub edx, ebx
or ecx, edx
je 0x5b6579
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esi + 0x38]
push ecx
push eax
push edx
lea eax, [esi + 0x10]
push eax
mov eax, dword [edi + 0x4cd0]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x48], 0x10
call eax
mov ecx, dword [esp + 0x48]
mov edx, dword [esi + 0x28]
push ecx
push eax
mov eax, dword [esp + 0x44]
mov ecx, dword [edi + eax*4 + 0x4b78]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x74]
movsx edx, word [edx + ecx*2]
mov ecx, dword [esp + 0x80]
add eax, edx
mov edx, dword [esp + 0x70]
movsx edx, word [edx + ecx*2]
add eax, edx
add esp, 0x30
cmp eax, dword [esp + 0x10]
jge 0x5b6579
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
mov ebx, ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 0x50], eax
jle 0x5b677c
jmp 0x5b6594
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
lea ecx, [ebx + ebx]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x30]
add ecx, 1
push ecx
mov ecx, dword [esp + 0x30]
push ecx
lea edx, [eax + eax]
mov dword [esp + 0x5c], eax
add eax, 0xfffffffe
push eax
mov dword [esp + 0x54], edx
mov edx, dword [esi + 0x38]
push ebx
push edx
mov edx, dword [edi + 0x4cd0]
mov dword [esp + 0x50], eax
lea eax, [esi + 0x10]
push eax
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x78], 0x20
call edx
mov ecx, dword [esp + 0x34]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x50]
add eax, 4
push eax
push ecx
add ebx, 0xfffffffe
push ebx
push edx
mov edx, dword [edi + 0x4cd0]
lea eax, [esi + 0x10]
push eax
lea eax, [esp + 0x90]
push eax
lea ecx, [esp + 0x2ec]
push ecx
mov dword [esp + 0x74], ebx
call edx
add esp, 0x40
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
lea edx, [eax + 1]
push edx
mov edx, dword [esi + 0x28]
push eax
mov eax, dword [esp + 0x34]
add ecx, eax
push ecx
push eax
mov eax, dword [esp + 0x34]
mov ecx, dword [edi + eax*4 + 0x4bb0]
push edx
call ecx
mov edx, dword [esp + 0x5c]
mov eax, dword [esp + 0x54]
movsx eax, word [eax + edx]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
movsx edx, word [ecx + edx - 4]
mov ebx, dword [esp + 0x7c]
add edx, eax
add edx, ebx
add esp, 0x1c
cmp edx, dword [esp + 0x10]
jge 0x5b6695
mov edx, dword [esp + 0x44]
movsx edx, word [ecx + edx - 4]
add edx, eax
add edx, ebx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x44]
movsx edx, word [ecx + edx + 4]
mov ebx, dword [esp + 0x64]
add edx, eax
add edx, ebx
cmp edx, dword [esp + 0x10]
jge 0x5b66c8
mov edx, dword [esp + 0x44]
movsx edx, word [ecx + edx + 4]
add edx, eax
mov eax, dword [esp + 0x54]
add edx, ebx
add eax, 2
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x44]
movsx eax, word [ecx + edx]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
movsx ecx, word [edx + ecx - 4]
mov ebx, dword [esp + 0x68]
add ecx, eax
add ecx, ebx
cmp ecx, dword [esp + 0x10]
jge 0x5b670c
mov ecx, dword [esp + 0x40]
movsx ecx, word [edx + ecx - 4]
add ecx, eax
add ecx, ebx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x40]
movsx ecx, word [edx + ecx + 4]
mov ebx, dword [esp + 0x6c]
add ecx, eax
add ecx, ebx
cmp ecx, dword [esp + 0x10]
jge 0x5b6747
mov ecx, dword [esp + 0x40]
movsx ecx, word [edx + ecx + 4]
mov edx, dword [esp + 0x28]
add ecx, eax
mov eax, dword [esp + 0x54]
add ecx, ebx
add edx, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x54]
xor ecx, ecx
cmp dword [esp + 0x14], edx
mov edx, dword [esp + 0x28]
sete cl
xor eax, eax
cmp dword [esp + 0x20], edx
sete al
test eax, ecx
jne 0x5b6778
mov eax, dword [esp + 0x50]
sub eax, 1
test eax, eax
mov dword [esp + 0x50], eax
jg 0x5b6590
mov ebx, dword [esp + 0x20]
cmp dword [ebp + 0x14], 0
jne 0x5b68ee
mov eax, dword [edi + 0x1f40]
cmp dword [esp + 0x14], eax
jle 0x5b6796
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esi + 0x38]
push ecx
push edx
push ebx
push eax
lea ecx, [esi + 0x10]
push ecx
mov ecx, dword [edi + 0x4cd0]
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x30], 0x10000000
mov dword [esp + 0x48], 0x10
call ecx
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [edi + ecx*4 + 0x4b5c]
push eax
mov eax, dword [esi + 0x28]
push 0x10
push eax
call edx
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x74]
movsx ecx, word [ecx + edx*2]
mov edx, dword [esp + 0x70]
add eax, ecx
movsx ecx, word [edx + ebx*2]
add eax, ecx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x48], eax
je 0x5b68e3
cmp eax, 0x10000000
jge 0x5b68ee
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar ecx, 1
push ecx
sar eax, 1
push eax
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x3c]
push ebx
push eax
mov eax, dword [edi + 0x4cd4]
mov dword [esp + 0x50], ecx
mov ecx, dword [esi + 0x20]
push ecx
lea edx, [esp + 0x88]
push 8
push edx
call eax
mov edx, dword [esi + 0x2c]
mov eax, dword [esp + 0x3c]
push 8
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [edi + eax*4 + 0x4b4c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x78]
add ecx, eax
add esp, 0x30
cmp ecx, 0x10000000
mov dword [esp + 0x48], ecx
jge 0x5b68ee
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esi + 0x24]
push ecx
push ebx
push edx
mov edx, dword [edi + 0x4cd4]
push eax
lea ecx, [esp + 0x88]
push 8
push ecx
call edx
mov ecx, dword [esi + 0x30]
mov edx, dword [esp + 0x3c]
push 8
lea eax, [esp + 0x94]
push eax
mov eax, dword [edi + edx*4 + 0x4b4c]
push 0x10
push ecx
call eax
add esp, 0x30
add dword [esp + 0x48], eax
mov eax, dword [esp + 0x48]
cmp eax, 0x10000000
jge 0x5b68ee
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5b6939
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
lea edx, [ecx*8]
sub edx, ecx
sar edx, 3
cmp edx, eax
jle 0x5b692f
mov ax, word [esp + 0x14]
mov dword [esi + 0x48], ecx
mov word [esi + 0x4c], bx
mov word [esi + 0x4e], ax
pop ebx
mov ecx, dword [esp + 0x4f8]
xor ecx, esp
call fcn.004f2a78
mov esp, ebp
pop ebp
ret
cmp ecx, eax
jge 0x5b6939
mov edx, dword [esp + 0x18]
mov dword [edx], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x14]
or edx, 0xffffffff
test eax, eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], eax
jle 0x5b6f9a
jmp 0x5b6959
mov edx, dword [esp + 0x58]
cmp dword [ebp + 0x14], 0
lea eax, [ebx + ebx]
mov dword [esp + 0x38], eax
lea eax, [ecx + ecx]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x48], eax
jne 0x5b6982
cmp edx, 1
je 0x5b6aec
mov edx, dword [esp + 0x2c]
lea eax, [ecx - 1]
mov ecx, dword [esp + 0x30]
push ecx
push edx
push eax
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x38]
push ebx
push eax
lea ecx, [esi + 0x10]
push ecx
mov ecx, dword [edi + 0x4cd0]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x44], 0x10
call ecx
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [edi + ecx*4 + 0x4b5c]
push eax
mov eax, dword [esi + 0x28]
push 0x10
push eax
call edx
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
movsx ecx, word [ecx + edx - 2]
mov edx, dword [esp + 0x68]
add eax, ecx
mov ecx, dword [esp + 0x70]
movsx edx, word [edx + ecx]
add eax, edx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x18], eax
je 0x5b6acc
cmp eax, dword [esp + 0x10]
jge 0x5b6ae6
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sar ecx, 1
push ecx
sub eax, edx
mov edx, dword [esi + 0x20]
sar eax, 1
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x30]
push eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 0x3c]
push ebx
push ecx
mov ecx, dword [edi + 0x4cd4]
push edx
lea eax, [esp + 0x88]
push 8
push eax
call ecx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x3c]
push 8
lea edx, [esp + 0x94]
push edx
mov edx, dword [edi + ecx*4 + 0x4b4c]
push 0x10
push eax
call edx
mov ecx, dword [esp + 0x48]
add ecx, eax
add esp, 0x30
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
jge 0x5b6ae6
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esi + 0x3c]
push ecx
mov ecx, dword [esi + 0x24]
push edx
push ebx
push eax
mov eax, dword [edi + 0x4cd4]
push ecx
lea edx, [esp + 0x88]
push 8
push edx
call eax
mov edx, dword [esi + 0x30]
mov eax, dword [esp + 0x3c]
push 8
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [edi + eax*4 + 0x4b4c]
push 0x10
push edx
call ecx
add esp, 0x30
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
jge 0x5b6ae6
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x58], 0
cmp dword [ebp + 0x14], 0
jne 0x5b6af7
cmp dword [esp + 0x4c], 0
je 0x5b6c6a
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
push ecx
push edx
add eax, 1
push eax
mov eax, dword [esi + 0x38]
push ebx
push eax
lea ecx, [esi + 0x10]
push ecx
mov ecx, dword [edi + 0x4cd0]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x44], 0x10
call ecx
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [edi + ecx*4 + 0x4b5c]
push eax
mov eax, dword [esi + 0x28]
push 0x10
push eax
call edx
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x78]
movsx ecx, word [ecx + edx + 2]
mov edx, dword [esp + 0x68]
add eax, ecx
mov ecx, dword [esp + 0x70]
movsx edx, word [edx + ecx]
add eax, edx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x18], eax
je 0x5b6c47
cmp eax, dword [esp + 0x10]
jge 0x5b6c64
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sub eax, edx
sar eax, 1
sar ecx, 1
push ecx
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
add eax, 1
push eax
mov eax, dword [esi + 0x3c]
push ebx
push eax
mov eax, dword [edi + 0x4cd4]
mov dword [esp + 0x50], ecx
mov ecx, dword [esi + 0x20]
push ecx
lea edx, [esp + 0x88]
push 8
push edx
call eax
mov edx, dword [esi + 0x2c]
mov eax, dword [esp + 0x3c]
push 8
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [edi + eax*4 + 0x4b4c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x48]
add ecx, eax
add esp, 0x30
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
jge 0x5b6c64
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x3c]
push edx
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esp + 0x3c]
add eax, 1
push eax
push ebx
push ecx
mov ecx, dword [edi + 0x4cd4]
push edx
lea eax, [esp + 0x88]
push 8
push eax
call ecx
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x3c]
push 8
lea edx, [esp + 0x94]
push edx
mov edx, dword [edi + ecx*4 + 0x4b4c]
push 0x10
push eax
call edx
add esp, 0x30
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
jge 0x5b6c64
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
add eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x58], 1
cmp dword [ebp + 0x14], 0
jne 0x5b6c75
cmp dword [esp + 0x4c], 3
je 0x5b6def
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esi + 0x38]
push ecx
lea eax, [ebx - 1]
push eax
push edx
mov dword [esp + 0x3c], eax
lea eax, [esi + 0x10]
push eax
mov eax, dword [edi + 0x4cd0]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x44], 0x10
call eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esi + 0x28]
push ecx
push eax
mov eax, dword [esp + 0x44]
mov ecx, dword [edi + eax*4 + 0x4b5c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x68]
movsx edx, word [edx + ecx - 2]
mov ecx, dword [esp + 0x78]
add eax, edx
mov edx, dword [esp + 0x74]
movsx ecx, word [ecx + edx]
add eax, ecx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x18], eax
je 0x5b6dcb
cmp eax, dword [esp + 0x10]
jge 0x5b6de9
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
sar ecx, 1
push ecx
sar eax, 1
push eax
push edx
mov edx, dword [esi + 0x20]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x34]
push eax
mov dword [esp + 0x4c], ecx
mov ecx, dword [esi + 0x3c]
push ecx
mov ecx, dword [edi + 0x4cd4]
push edx
lea eax, [esp + 0x88]
push 8
push eax
call ecx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x3c]
push 8
lea edx, [esp + 0x94]
push edx
mov edx, dword [edi + ecx*4 + 0x4b4c]
push 0x10
push eax
call edx
mov ecx, dword [esp + 0x48]
add ecx, eax
add esp, 0x30
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
jge 0x5b6de9
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esi + 0x3c]
push edx
mov edx, dword [esi + 0x24]
push eax
push ecx
mov ecx, dword [edi + 0x4cd4]
push edx
lea eax, [esp + 0x88]
push 8
push eax
call ecx
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x3c]
push 8
lea edx, [esp + 0x94]
push edx
mov edx, dword [edi + ecx*4 + 0x4b4c]
push 0x10
push eax
call edx
add esp, 0x30
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
jge 0x5b6de9
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov dword [esp + 0x58], 2
cmp dword [ebp + 0x14], 0
jne 0x5b6dfa
cmp dword [esp + 0x4c], 2
je 0x5b6f77
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [esi + 0x38]
push ecx
add eax, 1
push eax
push edx
lea eax, [esi + 0x10]
push eax
mov eax, dword [edi + 0x4cd0]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x44], 0x10
call eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esi + 0x28]
push ecx
push eax
mov eax, dword [esp + 0x44]
mov ecx, dword [edi + eax*4 + 0x4b5c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
movsx edx, word [edx + ecx]
mov ecx, dword [esp + 0x68]
add eax, edx
mov edx, dword [esp + 0x70]
movsx ecx, word [ecx + edx + 2]
add eax, ecx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x18], eax
je 0x5b6f56
cmp eax, dword [esp + 0x10]
jge 0x5b6f77
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
sar eax, 1
sar ecx, 1
push ecx
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x5c]
push edx
add eax, 1
push eax
mov eax, dword [esi + 0x3c]
push eax
mov eax, dword [edi + 0x4cd4]
mov dword [esp + 0x50], ecx
mov ecx, dword [esi + 0x20]
push ecx
lea edx, [esp + 0x88]
push 8
push edx
call eax
mov edx, dword [esi + 0x2c]
mov eax, dword [esp + 0x3c]
push 8
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [edi + eax*4 + 0x4b4c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x48]
add ecx, eax
add esp, 0x30
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
jge 0x5b6f77
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esi + 0x3c]
push eax
mov eax, dword [esp + 0x5c]
push ecx
add eax, 1
push eax
mov eax, dword [esi + 0x24]
push edx
mov edx, dword [edi + 0x4cd4]
push eax
lea ecx, [esp + 0x88]
push 8
push ecx
call edx
mov ecx, dword [esi + 0x30]
mov edx, dword [esp + 0x3c]
push 8
lea eax, [esp + 0x94]
push eax
mov eax, dword [edi + edx*4 + 0x4b4c]
push 0x10
push ecx
call eax
add esp, 0x30
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x10]
jge 0x5b6f77
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], eax
add ebx, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x58], 3
cmp ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x14]
jne 0x5b6f87
cmp ecx, dword [esp + 0x34]
je 0x5b6f9a
mov eax, dword [esp + 0x50]
sub eax, 1
test eax, eax
mov dword [esp + 0x50], eax
jg 0x5b6955
mov eax, dword [edi + 0x1f40]
cmp ecx, eax
jle 0x5b7115
cmp dword [ebp + 0x14], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x10000000
jne 0x5b6fc5
cmp dword [esp + 0x4c], 0xfffffffe
je 0x5b7115
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
push edx
mov edx, dword [esi + 0x38]
push eax
push ecx
push ebx
push edx
lea eax, [esi + 0x10]
push eax
mov eax, dword [edi + 0x4cd0]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x8c]
push edx
mov dword [esp + 0x44], 0x10
call eax
mov ecx, dword [esp + 0x44]
mov edx, dword [esi + 0x28]
push ecx
push eax
mov eax, dword [esp + 0x44]
mov ecx, dword [edi + eax*4 + 0x4b5c]
push 0x10
push edx
call ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x74]
movsx edx, word [edx + ecx*2]
mov ecx, dword [esp + 0x70]
add eax, edx
movsx edx, word [ecx + ebx*2]
add eax, edx
add esp, 0x30
cmp dword [esp + 0x5c], 0
mov dword [esp + 0x4c], eax
je 0x5b710a
cmp eax, 0x10000000
jge 0x5b7115
mov eax, dword [esp + 0x30]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
cdq
sar ecx, 1
push ecx
sub eax, edx
mov edx, dword [esi + 0x20]
sar eax, 1
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 0x3c]
push ebx
push ecx
mov ecx, dword [edi + 0x4cd4]
push edx
lea eax, [esp + 0x88]
push 8
push eax
call ecx
mov eax, dword [esi + 0x2c]
mov ecx, dword [esp + 0x3c]
push 8
lea edx, [esp + 0x94]
push edx
mov edx, dword [edi + ecx*4 + 0x4b4c]
push 0x10
push eax
call edx
mov ecx, dword [esp + 0x7c]
add ecx, eax
add esp, 0x30
cmp ecx, 0x10000000
mov dword [esp + 0x4c], ecx
jge 0x5b7115
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esi + 0x3c]
push ecx
mov ecx, dword [esi + 0x24]
push edx
push ebx
push eax
mov eax, dword [edi + 0x4cd4]
push ecx
lea edx, [esp + 0x88]
push 8
push edx
call eax
mov edx, dword [esi + 0x30]
mov eax, dword [esp + 0x3c]
push 8
lea ecx, [esp + 0x94]
push ecx
mov ecx, dword [edi + eax*4 + 0x4b4c]
push 0x10
push edx
call ecx
add esp, 0x30
add dword [esp + 0x4c], eax
mov eax, dword [esp + 0x4c]
cmp eax, 0x10000000
jge 0x5b7115
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x44]
mov dword [esi + 0x48], edx
mov word [esi + 0x4c], bx
mov word [esi + 0x4e], ax
movsx edx, word [ecx + eax*2]
mov eax, dword [esp + 0x40]
movsx ecx, word [eax + ebx*2]
add edx, ecx
mov ecx, dword [esp + 0x4fc]
pop ebx
xor ecx, esp
mov dword [esi + 0x44], edx
call fcn.004f2a78
mov esp, ebp
pop ebp
ret