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

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xec]
push ebx
push ebp
mov ebp, dword [esp + 0x30]
mov edx, dword [ebp + 4]
push esi
push edi
mov dword [esp + 0x18], edx
cmp ecx, 0x10
jne 0x10058207
mov edi, dword [esp + 0x54]
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
imul esi, edi
mov ecx, dword [esp + 0x30]
mov ebx, dword [ecx]
mov edx, dword [esp + 0x44]
mov ebp, dword [edx]
add eax, esi
shl eax, 4
add ebx, eax
push edi
add ebp, eax
push ebx
push ebp
call dword [0x10104a94]
push edi
lea eax, [ebx + 8]
push eax
lea ecx, [ebp + 8]
push ecx
call dword [0x10104a94]
push edi
lea ebx, [ebx + edi*8]
lea ebp, [ebp + edi*8]
push ebx
push ebp
call dword [0x10104a94]
push edi
add ebx, 8
push ebx
add ebp, 8
push ebp
call dword [0x10104a94]
mov ebx, dword [esp + 0x60]
mov edx, dword [ebx + 4]
mov ebp, dword [esp + 0x74]
mov eax, dword [ebp + 4]
shr esi, 1
add esi, dword [esp + 0x58]
shr edi, 1
add esi, esi
add esi, esi
add esi, esi
push edi
add edx, esi
push edx
add eax, esi
push eax
call dword [0x10104a94]
mov ecx, dword [ebx + 8]
mov edx, dword [ebp + 8]
push edi
add ecx, esi
push ecx
add edx, esi
push edx
call dword [0x10104a94]
add esp, 0x48
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
xor esi, esi
cmp ecx, esi
je 0x10058319
cmp ecx, 1
je 0x10058319
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], esi
cmp dword [esp + 0x58], esi
je 0x1005822d
add eax, 0x124
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x54]
lea edx, [ecx + ecx]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
jmp 0x10058254
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x58], 0
mov ecx, dword [eax + esi*8]
mov ebp, dword [eax + esi*8 + 4]
mov eax, ecx
je 0x10058269
cdq
sub eax, edx
sar eax, 1
add dword [esp + 0x24], eax
cmp dword [esp + 0x58], 0
mov eax, ebp
je 0x1005827b
cdq
sub eax, edx
sar eax, 1
add dword [esp + 0x10], eax
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x30]
push edx
add eax, eax
mov edx, esi
sar edx, 1
add edx, eax
mov eax, esi
and eax, 1
add eax, dword [esp + 0x24]
push ebx
add eax, eax
add eax, eax
add eax, eax
push ebp
push eax
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
push eax
mov eax, dword [ebp]
push eax
mov eax, dword [esp + 0x6c]
mov eax, dword [eax]
add edx, edx
add edx, edx
push eax
add edx, edx
push edi
call fcn.10057fd0
inc esi
add esp, 0x30
sub edi, 0xffffff80
cmp esi, 4
jl 0x10058250
mov eax, dword [esp + 0x24]
mov ecx, eax
sar eax, 3
and ecx, 0xf
add eax, dword [ecx*4 + 0x10081ef8]
mov edi, eax
mov eax, dword [esp + 0x10]
mov edx, eax
and edx, 0xf
sar eax, 3
add eax, dword [edx*4 + 0x10081ef8]
jmp 0x100584d4
cmp dword [eax + 0x1a8], esi
je 0x10058436
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x40]
mov ecx, dword [ebp]
mov edx, dword [esp + 0x44]
mov ebx, esi
imul ebx, edi
mov dword [esp + 0x38], ebx
add ebx, eax
mov eax, dword [edx]
shl ebx, 4
push edi
add ecx, ebx
push ecx
mov ecx, dword [esp + 0x50]
add eax, ebx
push eax
push ecx
call dword [0x10104a98]
mov edx, dword [ebp]
mov ecx, dword [esp + 0x54]
lea eax, [ebx + edx + 8]
mov edx, dword [ecx]
push edi
push eax
lea eax, [edx + ebx + 8]
mov ebx, dword [esp + 0x60]
push eax
lea ecx, [ebx + 0x80]
push ecx
call dword [0x10104a98]
mov edx, dword [esp + 0x48]
mov eax, dword [ebp]
mov ecx, dword [esp + 0x64]
shl esi, 4
add esi, 8
imul esi, edi
shl edx, 4
add esi, edx
mov edx, dword [ecx]
push edi
add eax, esi
push eax
add edx, esi
push edx
lea eax, [ebx + 0x100]
push eax
call dword [0x10104a98]
mov ecx, dword [ebp]
mov eax, dword [esp + 0x74]
lea edx, [esi + ecx + 8]
mov ecx, dword [eax]
push edi
push edx
lea edx, [ecx + esi + 8]
push edx
lea eax, [ebx + 0x180]
push eax
call dword [0x10104a98]
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0x68]
lea edx, [ecx*8]
mov ecx, dword [ebp + 4]
shr edx, 1
lea esi, [edx + eax*8]
mov edx, dword [esp + 0x84]
mov eax, dword [edx + 4]
add esp, 0x40
shr edi, 1
push edi
add ecx, esi
push ecx
add eax, esi
push eax
lea ecx, [ebx + 0x200]
push ecx
call dword [0x10104a98]
mov edx, dword [ebp + 8]
push edi
add edx, esi
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + 8]
push edx
add ecx, esi
push ecx
add ebx, 0x280
push ebx
call dword [0x10104a98]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov ecx, dword [esp + 0x58]
cmp ecx, esi
je 0x1005844c
mov edi, dword [eax + 0x124]
mov esi, dword [eax + 0x128]
jmp 0x10058451
mov edi, dword [eax]
mov esi, dword [eax + 4]
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x54]
push eax
mov eax, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x34]
push ebx
push esi
shl ecx, 4
push ecx
mov ecx, dword [esp + 0x50]
shl eax, 4
push eax
mov eax, dword [ecx]
mov ecx, dword [ebp]
mov ebp, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [eax]
mov eax, dword [ebp]
push ecx
mov ecx, dword [esp + 0x68]
push eax
mov eax, dword [ecx]
mov ecx, dword [esp + 0x70]
push eax
push ecx
mov ecx, edi
call fcn.10057ea0
add esp, 0x30
cmp dword [esp + 0x58], 0
je 0x100584b6
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov edi, eax
mov eax, esi
cdq
sub eax, edx
sar eax, 1
mov esi, eax
mov edx, edi
mov eax, esi
and edx, 3
sar edi, 1
add edi, dword [edx*4 + 0x10081f58]
and eax, 3
sar esi, 1
add esi, dword [eax*4 + 0x10081f58]
mov eax, esi
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x18]
add ecx, 0x200
shr ebx, 1
push ebx
push ecx
mov ecx, dword [esp + 0x4c]
push edx
mov edx, dword [esp + 0x68]
push ebp
push ecx
mov ecx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x44]
push edi
call fcn.10058090
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret