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

Disassembly:
push 0xffffffffffffffff
push 0x7485d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebx
push ebp
push esi
mov esi, dword [esp + 0x90]
mov eax, dword [esi]
push edi
mov ebp, ecx
push str.groups
mov ecx, esi
mov dword [esp + 0x18], ebp
call dword [eax + 0x24]
test eax, eax
je 0x5a1e75
mov edx, dword [ebp + 0xa8]
lea ecx, [ebp + 0xa8]
call dword [edx + 0x20]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push ebx
push 0x861bd8
push 0x85e1c8
push ebx
push eax
call fcn.0071f44c
mov edx, dword [esi]
add esp, 0x14
push 0x30
push str.grid_size
mov ecx, esi
mov dword [esp + 0x20], eax
call dword [edx + 0x60]
mov word [ebp + 0x90], ax
mov dword [esp + 0x38], vtable.CBArray_class_CBStr_.0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], ebx
mov eax, dword [esi]
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
mov dword [esp + 0x90], ebx
call dword [eax + 0x44]
cmp dword [esp + 0x40], ebx
mov dword [esp + 0x10], ebx
jbe 0x5a1cec
lea esp, [esp]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
push edx
lea ecx, [esp + 0x3c]
call dword [eax + 0x14]
mov eax, dword [eax]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x24]
sub esp, 0x20
mov edi, esp
mov ecx, edi
mov dword [esp + 0x3c], esp
call fcn.00412d40
mov dword [edi + 0xc], ebx
mov dword [edi + 8], vtable.CBSList_struct_TCompPiece_.0
mov dword [edi + 0x14], ebx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov eax, dword [ebp + 0x94]
lea edi, [ebp + 0x94]
mov ecx, edi
call dword [eax + 8]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x44]
mov edx, dword [esp + 0x38]
mov ebp, eax
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x3c]
call dword [edx + 0x14]
push eax
mov ecx, ebp
call fcn.004133c0
mov dword [esp + 0x4c], vtable.CBArray_class_CBStr_.0
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], ebx
mov eax, dword [esi]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, esi
mov byte [esp + 0x90], 1
call dword [eax + 0x44]
xor edi, edi
cmp dword [esp + 0x54], ebx
jbe 0x5a1c98
mov edi, edi
mov edx, dword [esp + 0x4c]
push edi
lea ecx, [esp + 0x50]
call dword [edx + 0x14]
mov eax, dword [eax]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x24]
lea ecx, [esp + 0x60]
call fcn.00412d40
lea ecx, [esp + 0x68]
mov byte [esp + 0x8c], 2
call fcn.00412d40
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov eax, dword [esi]
push ebx
push str.offs
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
mov byte [esp + 0x98], 3
call dword [eax + 0xec]
mov edx, dword [eax]
mov dword [esp + 0x70], edx
mov eax, dword [eax + 4]
mov edx, dword [esi]
push ebx
mov dword [esp + 0x78], eax
push str.connect
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call dword [edx + 0xec]
mov cx, word [esp + 0x28]
mov dx, word [esp + 0x2c]
mov eax, dword [esi]
push ebx
mov word [esp + 0x7c], cx
push 0x7acd94
mov ecx, esi
mov word [esp + 0x82], dx
call dword [eax + 0x98]
mov edx, dword [esi]
push ebx
push 0x7c91f0
mov ecx, esi
mov byte [esp + 0x84], al
call dword [edx + 0x98]
push ebx
mov byte [esp + 0x81], al
mov eax, dword [esi]
push str.index
mov ecx, esi
call dword [eax + 0x90]
mov edx, dword [esi]
mov word [esp + 0x7e], ax
lea eax, [esp + 0x60]
push eax
push str.type
mov ecx, esi
mov dword [esp + 0x88], ebp
call dword [edx + 0x6c]
mov eax, dword [esp + 0x60]
cmp eax, ebx
je 0x5a1c10
cmp word [eax], bx
je 0x5a1c10
cmp byte [esp + 0x7c], bl
je 0x5a1c10
mov ecx, dword [esp + 0x14]
mov dx, word [ecx + 0x40]
mov ecx, dword [esp + 0x7c]
push edx
push ecx
mov ecx, dword [esp + 0x20]
push eax
call fcn.00594800
push eax
lea ecx, [esp + 0x6c]
call fcn.00413310
jmp 0x5a1c21
mov edx, dword [esi]
lea eax, [esp + 0x68]
push eax
push 0x781fa8
mov ecx, esi
call dword [edx + 0x6c]
mov eax, dword [esp + 0x68]
cmp eax, ebx
je 0x5a1c2e
cmp word [eax], bx
jne 0x5a1c43
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x6c]
mov byte [esp + 0x80], bl
call fcn.004133c0
sub esp, 0x24
lea edx, [esp + 0x84]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.005826f0
mov eax, dword [ebp + 8]
lea ecx, [ebp + 8]
call dword [eax + 8]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x28]
lea ecx, [esp + 0x68]
mov byte [esp + 0x8c], 4
call fcn.00412de0
lea ecx, [esp + 0x60]
mov byte [esp + 0x8c], 1
call fcn.00412de0
add edi, 1
cmp edi, dword [esp + 0x54]
jb 0x5a1af0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x28]
mov eax, dword [esp + 0x50]
cmp eax, ebx
mov byte [esp + 0x8c], bl
mov dword [esp + 0x4c], vtable.CBArray_class_CBStr_.0
je 0x5a1cd3
mov ecx, dword [eax - 4]
lea edi, [eax - 4]
push fcn.00412de0
push ecx
push 8
push eax
call fcn.0071f0d2
push edi
call fcn.0040fa80
add esp, 4
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
add eax, 1
cmp eax, dword [esp + 0x40]
mov dword [esp + 0x10], eax
jb 0x5a1a40
mov edx, dword [ebp + 0x94]
lea ecx, [ebp + 0x94]
call dword [edx + 0x48]
test eax, eax
jne 0x5a1d49
sub esp, 0x20
mov edi, esp
mov ecx, edi
mov dword [esp + 0x3c], esp
call fcn.00412d40
mov dword [edi + 0xc], ebx
mov dword [edi + 8], vtable.CBSList_struct_TCompPiece_.0
mov dword [edi + 0x14], ebx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov eax, dword [ebp + 0x94]
lea edi, [ebp + 0x94]
mov ecx, edi
call dword [eax + 4]
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0x40]
push str.wall
mov ecx, eax
call fcn.00413310
mov ecx, ebp
call fcn.0059c000
lea ecx, [esp + 0x20]
call fcn.00412d40
mov eax, dword [esi]
lea ecx, [esp + 0x20]
push ecx
push 0x7cb30c
mov ecx, esi
mov byte [esp + 0x94], 5
call dword [eax + 0x6c]
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x5a1e26
cmp word [eax], bx
je 0x5a1e26
mov dword [esp + 0x4c], vtable.CBArray_class_CBStr_.0
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], 1
mov dword [esp + 0x5c], ebx
lea edx, [esp + 0x4c]
push edx
push 0x2c
lea ecx, [esp + 0x28]
mov byte [esp + 0x94], 6
call fcn.00413d40
xor edi, edi
cmp dword [esp + 0x54], ebx
jbe 0x5a1df1
mov eax, dword [esp + 0x4c]
push edi
lea ecx, [esp + 0x50]
call dword [eax + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x280]
cmp eax, ebx
je 0x5a1de8
mov dword [eax + 0x1c], 1
add edi, 1
cmp edi, dword [esp + 0x54]
jb 0x5a1dc3
mov eax, dword [esp + 0x50]
cmp eax, ebx
mov byte [esp + 0x8c], 5
mov dword [esp + 0x4c], vtable.CBArray_class_CBStr_.0
je 0x5a1e26
mov ecx, dword [eax - 4]
lea edi, [eax - 4]
push fcn.00412de0
push ecx
push 8
push eax
call fcn.0071f0d2
push edi
call fcn.0040fa80
add esp, 4
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x28]
lea ecx, [esp + 0x20]
mov byte [esp + 0x8c], bl
call fcn.00412de0
mov eax, dword [esp + 0x3c]
cmp eax, ebx
mov dword [esp + 0x8c], 0xffffffff
mov dword [esp + 0x38], vtable.CBArray_class_CBStr_.0
je 0x5a1e75
mov ecx, dword [eax - 4]
lea esi, [eax - 4]
push fcn.00412de0
push ecx
push 8
push eax
call fcn.0071f0d2
push esi
call fcn.0040fa80
add esp, 4
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x80
ret 4