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

Disassembly:
sub esp, 0x18
mov ecx, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x24]
mov eax, ebx
shr eax, 0x18
imul eax, ecx
and byte [esp + 0x34], 1
push ebp
push esi
push edi
sub eax, 0xffffff80
mov edi, ebx
mov edx, eax
shr edi, 0x10
shr edx, 8
mov esi, ebx
add edx, eax
shr esi, 8
shr edx, 8
and edi, 0xff
mov dword [esp + 0x3c], edx
and esi, 0xff
mov edx, dword [esp + 0x34]
mov eax, edx
shr eax, 0x18
mov ebp, edx
imul eax, ecx
shr ebp, 8
and ebp, 0xff
movzx ebx, bl
mov dword [esp + 0x1c], ebp
sub eax, 0xffffff80
mov ecx, eax
shr ecx, 8
add ecx, eax
movzx eax, dl
shr ecx, 8
mov dword [esp + 0x34], ecx
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov dword [esp + 0x30], eax
cmp byte [esp + 0x40], 0
mov dword [esp + 0x20], ecx
je 0x58bd9c
mov edx, dword [esp + 0x3c]
imul edi, edx
imul esi, edx
imul ebx, edx
mov edx, dword [esp + 0x34]
imul ecx, edx
imul ebp, edx
lea eax, [edi + 0x80]
mov edi, eax
shr edi, 8
add edi, eax
lea eax, [esi + 0x80]
mov esi, eax
shr edi, 8
shr esi, 8
add esi, eax
lea eax, [ebx + 0x80]
mov ebx, eax
shr esi, 8
shr ebx, 8
add ebx, eax
lea eax, [ecx + 0x80]
mov ecx, eax
shr ebx, 8
shr ecx, 8
add ecx, eax
lea eax, [ebp + 0x80]
mov ebp, eax
shr ecx, 8
shr ebp, 8
add ebp, eax
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x30]
imul eax, edx
shr ebp, 8
mov dword [esp + 0x1c], ebp
sub eax, 0xffffff80
mov ecx, eax
shr ecx, 8
add ecx, eax
shr ecx, 8
mov dword [esp + 0x30], ecx
jmp 0x58bda0
mov edx, dword [esp + 0x34]
sub edx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x38]
shl edx, 0x10
mov eax, edx
cdq
lea ecx, [ebp - 1]
idiv ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
sub eax, edi
shl edi, 0x10
shl eax, 0x10
add edi, 0x2000
cdq
idiv ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
sub eax, esi
shl esi, 0x10
shl eax, 0x10
add esi, 0x2000
cdq
idiv ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
sub eax, ebx
shl ebx, 0x10
shl eax, 0x10
add ebx, 0x2000
cdq
idiv ecx
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
shl edx, 0x10
add edx, 0x2000
mov dword [esp + 0x20], eax
cmp dword [esp + 0x3c], 0xff
mov dword [esp + 0x14], edx
jne 0x58bf45
test ecx, ecx
jne 0x58bf45
mov edx, dword [esp + 0x2c]
lea eax, [edi + 0xc000]
mov dword [esp + 0x40], eax
lea ebp, [ebx + 0xc000]
lea eax, [esi + 0xc000]
add edx, 0x800
mov dword [esp + 0x30], eax
mov ecx, esi
lea edx, [edx + 4]
shr ecx, 8
mov eax, edi
and eax, 0xffff00ff
or ecx, eax
mov eax, ebx
and ecx, 0xffffff00
shr eax, 0x10
or ecx, eax
add ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x40]
or ecx, 0xff000000
mov dword [edx - 0x804], ecx
add eax, 0xffffc000
mov ecx, dword [esp + 0x30]
and eax, 0xffff00ff
add ecx, 0xffffc000
shr ecx, 8
or ecx, eax
lea eax, [ebp - 0x4000]
and ecx, 0xffffff00
shr eax, 0x10
or ecx, eax
mov eax, dword [esp + 0x40]
or ecx, 0xff000000
and eax, 0xffff00ff
mov dword [edx - 0x404], ecx
mov ecx, dword [esp + 0x30]
shr ecx, 8
or ecx, eax
mov eax, ebp
and ecx, 0xffffff00
shr eax, 0x10
or ecx, eax
mov eax, dword [esp + 0x40]
or ecx, 0xff000000
add eax, 0xffff8000
mov dword [edx - 4], ecx
and eax, 0xffff00ff
mov ecx, dword [esp + 0x30]
lea ecx, [ecx - 0x8000]
shr ecx, 8
or ecx, eax
lea eax, [ebp - 0x8000]
add ebp, dword [esp + 0x20]
and ecx, 0xffffff00
shr eax, 0x10
or ecx, eax
mov eax, dword [esp + 0x18]
add dword [esp + 0x40], eax
add edi, eax
mov eax, dword [esp + 0x1c]
or ecx, 0xff000000
add dword [esp + 0x30], eax
add esi, eax
dec dword [esp + 0x38]
mov dword [edx + 0x3fc], ecx
jne 0x58be51
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
cmp byte [esp + 0x40], 0
je 0x58c0bd
mov ebp, dword [esp + 0x2c]
lea eax, [esi + 0xc000]
mov dword [esp + 0x3c], eax
add ebp, 0x800
lea eax, [ebx + 0xc000]
mov dword [esp + 0x34], eax
lea eax, [edi + 0xc000]
mov dword [esp + 0x30], eax
mov eax, ecx
shl eax, 8
mov dword [esp + 0x24], eax
lea eax, [edx + 0xc000]
shl eax, 8
mov dword [esp + 0x40], eax
mov edi, edi
mov ecx, ebx
lea ebp, [ebp + 4]
shr ecx, 8
mov eax, esi
and eax, 0xffff00ff
or ecx, eax
mov eax, edx
mov edx, dword [esp + 0x34]
and eax, 0xffff00ff
shl eax, 8
add edx, 0xffffc000
or eax, edi
shr ecx, 8
and eax, 0xffff0000
shr edx, 8
or ecx, eax
mov eax, dword [esp + 0x3c]
add eax, 0xffffc000
mov dword [ebp - 0x804], ecx
mov ecx, dword [esp + 0x40]
and eax, 0xffff00ff
or edx, eax
add ecx, 0xffc00000
mov eax, dword [esp + 0x30]
and ecx, 0xff00ffff
add eax, 0xffffc000
shr edx, 8
or ecx, eax
mov eax, dword [esp + 0x3c]
and ecx, 0xffff0000
and eax, 0xffff00ff
or edx, ecx
mov dword [ebp - 0x404], edx
mov edx, dword [esp + 0x34]
mov ecx, edx
shr ecx, 8
add edx, 0xffff8000
or ecx, eax
shr edx, 8
mov eax, dword [esp + 0x40]
and eax, 0xff00ffff
shr ecx, 8
or eax, dword [esp + 0x30]
and eax, 0xffff0000
or ecx, eax
mov eax, dword [esp + 0x3c]
add eax, 0xffff8000
mov dword [ebp - 4], ecx
mov ecx, dword [esp + 0x40]
and eax, 0xffff00ff
or edx, eax
add ecx, 0xff800000
mov eax, dword [esp + 0x30]
and ecx, 0xff00ffff
add eax, 0xffff8000
shr edx, 8
or ecx, eax
mov eax, dword [esp + 0x24]
add dword [esp + 0x40], eax
and ecx, 0xffff0000
mov eax, dword [esp + 0x18]
or edx, ecx
add dword [esp + 0x30], eax
add edi, eax
mov eax, dword [esp + 0x1c]
add esi, eax
add dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
add ebx, eax
add dword [esp + 0x34], eax
mov dword [ebp + 0x3fc], edx
mov edx, dword [esp + 0x14]
add edx, dword [esp + 0x10]
dec dword [esp + 0x38]
mov dword [esp + 0x14], edx
jne 0x58bf90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x2c]
add eax, 0x800
mov dword [esp + 0x38], eax
lea eax, [edx + 0xc000]
mov dword [esp + 0x40], eax
lea eax, [edi + 0xc000]
mov dword [esp + 0x30], eax
lea eax, [esi + 0xc000]
mov dword [esp + 0x3c], eax
lea eax, [ebx + 0xc000]
mov dword [esp + 0x34], eax
mov eax, ebx
shr eax, 0x10
push eax
mov eax, esi
shr eax, 0x10
push eax
mov eax, edi
shr eax, 0x10
push eax
mov eax, edx
shr eax, 0x10
push eax
call fcn.0058cbf0
mov ecx, dword [esp + 0x48]
mov dword [ecx - 0x800], eax
mov eax, dword [esp + 0x44]
add eax, 0xffffc000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x50]
add eax, 0xffffc000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x48]
add eax, 0xffffc000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x5c]
add eax, 0xffffc000
shr eax, 0x10
push eax
call fcn.0058cbf0
mov ecx, dword [esp + 0x58]
mov dword [ecx - 0x400], eax
mov eax, dword [esp + 0x54]
shr eax, 0x10
push eax
mov eax, dword [esp + 0x60]
shr eax, 0x10
push eax
mov eax, dword [esp + 0x58]
shr eax, 0x10
push eax
mov eax, dword [esp + 0x6c]
shr eax, 0x10
push eax
call fcn.0058cbf0
mov ecx, dword [esp + 0x68]
mov dword [ecx], eax
mov eax, dword [esp + 0x64]
add eax, 0xffff8000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x70]
add eax, 0xffff8000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x68]
add eax, 0xffff8000
shr eax, 0x10
push eax
mov eax, dword [esp + 0x7c]
add eax, 0xffff8000
shr eax, 0x10
push eax
call fcn.0058cbf0
mov ecx, dword [esp + 0x78]
add esp, 0x40
mov edx, dword [esp + 0x14]
mov dword [ecx + 0x400], eax
add ecx, 4
mov eax, dword [esp + 0x10]
add edx, eax
add dword [esp + 0x40], eax
mov eax, dword [esp + 0x18]
add edi, eax
add dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
add esi, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x14], edx
add dword [esp + 0x3c], eax
mov eax, dword [esp + 0x20]
add ebx, eax
add dword [esp + 0x34], eax
dec ebp
jne 0x58c0f2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret