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

Disassembly:
sub esp, 0x18
push ebx
push esi
push edi
push 0x1248
call fcn.0056e940
mov edi, dword [esp + 0x2c]
mov ecx, dword [edi + 0x80]
mov esi, eax
mov eax, dword [edi + 0x1ee0]
mov dword [esp + 0x20], eax
mov eax, 0x20
shl eax, cl
add esp, 4
mov dword [esp + 0x28], eax
mov eax, dword [edi]
test al, 2
je 0x57bee5
mov ebx, 0x40
mov dword [esp + 0x14], ebx
jmp 0x57bef7
and al, 1
neg al
sbb eax, eax
and eax, 0x10
add eax, 0x10
mov dword [esp + 0x14], eax
mov ebx, eax
test esi, esi
jne 0x57bf04
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret
push ebp
push 0x1248
push 0
push esi
call fcn.004f9810
mov edx, dword [edi + 0xc]
lea ecx, [ebx - 1]
add edx, 0xf
not ecx
and edx, 0xfffffff0
lea eax, [edx + ebx + 0x3f]
and eax, ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0x80]
mov ebx, 0x10
shl ebx, cl
mov ecx, dword [edi + 0x10]
mov dword [esi + 0x2c], 3
mov dword [esi + 0x3c], edx
lea ebp, [ecx + ebx - 1]
add ebx, 0xffffffff
lea ecx, [eax + 0xf]
not ebx
and ebp, ebx
sar eax, 1
and ecx, 0xfffffff0
add eax, 0xf
mov dword [esi + 0x30], ecx
and eax, 0xfffffff0
mov ebx, ebp
sar ebx, 1
lea ecx, [esi + 0x34]
mov dword [ecx], eax
mov dword [esi + 0x38], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], ebx
sar edx, 1
mov dword [esi + 0x48], ebp
mov ebx, ebp
mov dword [esp + 0x30], ebp
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], edx
mov ebp, dword [esi + 0x4c]
add eax, eax
add ebx, eax
imul ebx, dword [esi + 0x30]
add ebp, eax
add esp, 0xc
imul ebp, dword [ecx]
mov dword [esp + 0x10], 1
mov dword [esp + 0x14], ecx
push ebp
call fcn.0056e940
mov ecx, eax
mov eax, dword [esp + 0x18]
add esp, 4
test ecx, ecx
mov dword [eax + 0x60], ecx
je 0x57c41e
mov eax, dword [eax]
imul eax, dword [esp + 0x2c]
add eax, 0x20
cdq
sub eax, edx
mov edx, eax
mov eax, dword [esp + 0x14]
sar edx, 1
add edx, ecx
mov ecx, dword [esp + 0x10]
add ecx, 1
mov dword [eax + 0x30], edx
add eax, 4
cmp ecx, 3
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jl 0x57bfa6
cmp dword [edi + 0x188], 0
je 0x57c06c
lea eax, [ebx*4]
push eax
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x90], eax
je 0x57c41e
mov ecx, dword [esi + 0x30]
mov ebp, dword [esp + 0x2c]
imul ecx, ebp
lea edx, [ecx + eax + 0x20]
mov dword [esi + 0x6c], edx
mov eax, dword [esi + 0x30]
imul eax, ebp
add eax, dword [esi + 0x90]
lea ecx, [eax + ebx + 0x20]
mov dword [esi + 0x70], ecx
mov edx, dword [esi + 0x30]
imul edx, ebp
lea eax, [edx + ebx*2 + 0x20]
add eax, dword [esi + 0x90]
lea edx, [ebx + ebx*2]
mov dword [esi + 0x74], eax
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x90]
imul ecx, ebp
add ecx, edx
lea ecx, [ecx + eax + 0x20]
mov dword [esi + 0x78], ecx
mov edx, dword [esi + 0x6c]
jmp 0x57c093
push ebx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x90], eax
je 0x57c41e
mov ecx, dword [esi + 0x30]
imul ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x2c]
lea edx, [ecx + eax + 0x20]
mov dword [esi + 0x60], edx
cmp dword [edi + 0x18ec], 0
je 0x57c203
mov eax, dword [esi + 0x3c]
mov ecx, dword [esp + 0x18]
cdq
sub eax, edx
sar eax, 1
lea ecx, [eax + ecx + 0x3f]
and ecx, dword [esp + 0x1c]
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x48]
cdq
sub eax, edx
sar eax, 1
lea ebx, [eax + ebp*2]
imul ebx, ecx
lea edx, [ebx*4]
push edx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x5c], eax
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0xa0], eax
je 0x57c41e
mov ecx, dword [esi + 0x54]
imul ecx, ebp
lea edx, [ecx + eax + 0x20]
mov dword [esi + 0x7c], edx
mov eax, dword [esi + 0x54]
imul eax, ebp
add eax, dword [esi + 0xa0]
mov dword [esp + 0x10], 0
lea ecx, [eax + ebx + 0x20]
mov dword [esi + 0x80], ecx
mov edx, dword [esi + 0x54]
imul edx, ebp
lea eax, [edx + ebx*2 + 0x20]
add eax, dword [esi + 0xa0]
lea edx, [ebx + ebx*2]
mov dword [esi + 0x84], eax
mov ecx, dword [esi + 0x54]
mov eax, dword [esi + 0xa0]
imul ecx, ebp
add ecx, edx
lea ecx, [ecx + eax + 0x20]
mov dword [esi + 0x88], ecx
mov eax, dword [edi + 0x5c]
xor edx, edx
test eax, eax
setne dl
test edx, edx
jl 0x57c203
lea ecx, [esi + 0xbc]
xor ebp, ebp
mov dword [esp + 0x14], ecx
xor ebx, ebx
test eax, eax
jl 0x57c1da
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
mov eax, dword [edi + 0x1ee0]
add eax, eax
add eax, eax
push eax
call fcn.0056e940
mov ecx, dword [esp + 0x1c]
add esp, 4
test eax, eax
mov dword [ecx], eax
je 0x57c41e
mov edx, dword [edi + 0x1ee0]
add edx, edx
add edx, edx
push edx
push 0
push eax
call fcn.004f9810
mov eax, dword [edi + 0x1ee0]
add eax, eax
add eax, eax
push eax
call fcn.0056e940
add esp, 0x10
test eax, eax
lea ecx, [ebx + ebp]
mov dword [esi + ecx*4 + 0x144], eax
je 0x57c41e
add dword [esp + 0x18], 4
add ebx, 1
cmp ebx, dword [edi + 0x5c]
jle 0x57c174
mov ecx, dword [esp + 0x10]
add dword [esp + 0x14], 0x44
mov eax, dword [edi + 0x5c]
add ecx, 1
xor edx, edx
add ebp, 0x11
test eax, eax
setne dl
mov dword [esp + 0x10], ecx
cmp ecx, edx
jle 0x57c166
mov ebp, dword [esp + 0x2c]
cmp dword [edi + 0x178], 3
jl 0x57c24c
mov ecx, dword [esi + 0x48]
lea eax, [ebp + ebp]
add ecx, eax
imul ecx, dword [esi + 0x30]
add ecx, ecx
mov edx, ecx
mov ecx, dword [edi + 0x18f0]
shl edx, cl
push edx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x9c], eax
je 0x57c41e
mov ecx, dword [esi + 0x30]
imul ecx, ebp
lea edx, [eax + ecx*2 + 0x40]
mov dword [esi + 0x8c], edx
mov ebp, dword [esp + 0x20]
or eax, 0xffffffff
xor ebx, ebx
push ebp
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x1234], eax
call fcn.0056e940
add esp, 4
cmp eax, ebx
mov dword [esi + 0xb0], eax
jne 0x57c28d
push str.malloc_failed_n
push ebx
jmp 0x57c425
mov ebx, ebp
shl ebx, 6
push ebx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0xb4], eax
je 0x57c41e
lea eax, [ebp*4]
push eax
mov dword [esp + 0x30], eax
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x1cc], eax
je 0x57c41e
lea eax, [ebp + ebp]
push eax
call fcn.0056e940
xor ebp, ebp
add esp, 4
cmp eax, ebp
mov dword [esi + 0x122c], eax
je 0x57c313
cmp dword [edi + 0x5c], ebp
je 0x57c31e
push ebx
call fcn.0056e940
add esp, 4
cmp eax, ebp
mov dword [esi + 0xb8], eax
je 0x57c313
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.0056e940
add esp, 4
cmp eax, ebp
mov dword [esi + 0x1d0], eax
jne 0x57c32a
push str.malloc_failed_n
push ebp
jmp 0x57c425
mov dword [esi + 0xb8], ebp
mov dword [esi + 0x1d0], ebp
mov eax, dword [esp + 0x24]
cdq
and edx, 0xf
add eax, edx
mov ebx, eax
sar ebx, 4
add ebx, ebx
add ebx, ebx
push ebx
mov dword [esp + 0x28], ebx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x121c], eax
je 0x57c41e
push ebx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x1220], eax
je 0x57c41e
mov eax, dword [edi + 0x5c]
add eax, 2
test eax, eax
mov dword [esp + 0x10], ebp
jle 0x57c3d4
lea ebp, [esi + 0xd08]
mov dword [esp + 0x2c], ebp
xor ebx, ebx
test eax, eax
jle 0x57c3b4
lea ecx, [ecx]
mov edx, dword [esp + 0x24]
push edx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x57c41e
mov eax, dword [edi + 0x5c]
add ebx, 1
add eax, 2
add ebp, 4
cmp ebx, eax
jl 0x57c390
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x2c]
mov eax, dword [edi + 0x5c]
add ecx, 1
add ebp, 0x48
add eax, 2
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x2c], ebp
jl 0x57c387
cmp dword [edi + 0x1f0], 0
je 0x57c441
mov ecx, dword [edi + 0x1ee0]
add ecx, ecx
add ecx, ecx
push ecx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x1224], eax
je 0x57c41e
cmp dword [edi + 0x18ec], 0
je 0x57c441
mov edx, dword [edi + 0x1ee0]
add edx, edx
push edx
call fcn.0056e940
add esp, 4
test eax, eax
mov dword [esi + 0x1230], eax
jne 0x57c441
push str.malloc_failed_n
push 0
push edi
call fcn.0056e800
add esp, 0xc
push esi
call fcn.00579930
add esp, 4
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x18
ret