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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov esi, dword [esp + 0xa0]
mov eax, dword [esp + 0xa4]
mov ebx, dword [esi]
mov dword [esi + 0x98], eax
test ebx, ebx
je 0x502745
mov eax, dword [ebx + 0x50]
cmp dword [esp + 0xa4], eax
jb 0x502745
lea edx, [esp + 0x40]
mov dword [esp + 0x1c], edx
mov edx, dword [ebx + 0x58]
test edx, edx
mov dword [esi], edx
je 0x502a60
mov ebp, dword [ebx]
mov dword [esi + 0x9c], eax
mov eax, dword [ebx + 0x54]
test ebp, ebp
mov dword [esi + 0xa0], eax
jne 0x502835
mov edi, dword [esi + 0x100]
test edi, edi
jne 0x5028c4
mov eax, dword [ebx + 0x4c]
cmp eax, dword [esi + 0xac]
mov edx, dword [ebx + 0x48]
jae 0x502458
mov dword [esi + 0xac], eax
mov edi, eax
imul edi, edx
cmp dword [esi + 0xb8], edi
mov dword [esi + 0xb4], eax
mov dword [esi + 0xb0], edx
jae 0x5028b1
mov eax, dword [esi + 0xbc]
test eax, eax
je 0x5024c0
mov dword [esp], eax
call fcn.008f2ba8
mov eax, dword [esi + 0xd4]
mov dword [esp], eax
call fcn.008f2ba8
mov edi, dword [esi + 0xb0]
imul edi, dword [esi + 0xb4]
mov dword [esi + 0xb8], 0
mov dword [esi + 0xd0], 0
mov dword [esi + 0xcc], 0
lea eax, [edi + edi]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esi + 0xbc], eax
je 0x502712
add eax, edi
mov dword [esi + 0xb8], edi
mov dword [esi + 0xc0], eax
mov dword [esp], edi
call sub.msvcrt.dll_malloc
mov edx, dword [ebx + 0x48]
mov dword [esi + 0xd4], eax
mov eax, dword [ebx + 0x4c]
mov ecx, dword [ebx + 0x3c]
mov edi, dword [ebx + 0xc]
mov ebp, dword [esi + 0xd4]
mov dword [esi + 0xc4], ecx
mov ecx, dword [ebx + 0x40]
mov dword [esi + 0xd0], edx
mov dword [esp + 0x2c], ebp
mov dword [esi + 0xc8], ecx
mov ecx, dword [ebx + 0x44]
mov dword [esi + 0x64], edi
mov dword [esi + 0xb4], eax
lea eax, [esi + 0x64]
mov dword [esi + 0xcc], ecx
lea ecx, [ebx + 0xc]
mov edi, dword [ecx + 4]
mov dword [eax + 4], edi
mov edi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [eax + 8], edi
mov edi, dword [ebx + 0x1c]
mov dword [eax + 0xc], ecx
lea ecx, [ebx + 0x1c]
lea eax, [esi + 0x74]
mov dword [esi + 0x74], edi
mov edi, dword [ecx + 4]
mov dword [eax + 4], edi
mov edi, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [eax + 8], edi
mov dword [eax + 0xc], ecx
mov ecx, dword [ebx + 0x34]
cmp ecx, dword [ebx + 0x30]
mov dword [esp + 0x38], ecx
jbe 0x5026fa
mov eax, dword [ebx + 0x2c]
shr ecx, 1
cmp eax, ecx
jbe 0x5026fa
mov edi, dword [esi + 0xd0]
xor edx, edx
test edi, edi
je 0x5026fa
mov dword [esp + 0x30], 0
xor edi, edi
mov dword [esp + 0x34], esi
jmp 0x50262f
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0xcc]
sub ebp, edi
add ebp, edx
mov edx, dword [ebx + 0x38]
lea ecx, [edx + 0xc]
mov esi, dword [ebx + ecx*4]
test esi, 1
je 0x5025cd
add esi, 1
mov dword [ebx + ecx*4], esi
add edx, 1
xor edi, edi
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
add dword [esp + 0x30], 1
and edx, 1
sub edx, ecx
mov dword [ebx + 0x38], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], ebp
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x38]
cmp edx, dword [ebx + 0x30]
jbe 0x5026f0
mov edx, dword [ebx + 0x34]
mov eax, dword [ebx + 0x2c]
shr edx, 1
cmp edx, eax
jae 0x5026f0
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0xd0]
cmp edx, dword [esp + 0x30]
jbe 0x502b02
add dword [esp + 0x2c], ebp
mov esi, dword [ebx + 0x38]
lea edx, [esi + 0xc]
mov ecx, dword [ebx + edx*4]
mov dword [esp + 0x3c], ecx
shr ecx, 1
cmp eax, ecx
mov dword [esp + 0x28], ecx
jbe 0x502750
mov ebp, ecx
mov ecx, dword [ebx + 4]
test byte [esp + 0x3c], 1
movzx ecx, byte [ecx + ebp]
mov byte [esp + 0x28], cl
je 0x5026a7
and ecx, 0xf
mov ebp, ecx
mov ecx, dword [esp + 0x3c]
and ebp, 0xff
add ecx, 1
cmp ebp, 3
mov dword [esp + 0x18], ecx
mov dword [ebx + edx*4], ecx
jbe 0x5026b0
mov eax, ebp
not eax
shr ebp, 2
and eax, 3
add edi, ebp
test ebp, ebp
je 0x5025a8
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0xcc]
cmp edi, edx
jb 0x5025e6
jmp 0x5025b2
shr cl, 4
mov ebp, ecx
jmp 0x502663
test ebp, ebp
je 0x502772
mov esi, dword [esp + 0x18]
shl ebp, 4
shr esi, 1
cmp esi, eax
jae 0x502810
mov eax, dword [ebx + 4]
test byte [esp + 0x18], 1
movzx eax, byte [eax + esi]
je 0x502802
and eax, 0xf
mov ecx, dword [esp + 0x18]
movzx eax, al
or ebp, eax
add ecx, 1
mov dword [ebx + edx*4], ecx
jmp 0x50267c
mov esi, dword [esp + 0x34]
mov edx, dword [esi + 0xd0]
mov dword [esp + 4], edx
mov eax, dword [esi + 0xcc]
xor ecx, ecx
xor edx, edx
mov dword [esp], eax
mov eax, esi
call fcn.005013f0
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.008f2ba8
mov dword [esp], ebx
call fcn.008f2ba8
mov ebx, dword [esi]
mov dword [esi + 0x10c], 1
test ebx, ebx
je 0x502745
mov eax, dword [ebx + 0x50]
cmp dword [esp + 0xa4], eax
jae 0x502410
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.SPUdec:_ERROR:_get_nibble_past_end_of_packet_n
mov dword [esp + 4], 2
mov dword [esp], 0x1a
call fcn.0042b9b0
mov eax, dword [ebx + 0x2c]
mov esi, dword [ebx + 0x38]
lea edx, [esi + 0xc]
mov ebp, dword [ebx + edx*4]
mov dword [esp + 0x3c], ebp
shr ebp, 1
cmp ebp, eax
mov dword [esp + 0x28], ebp
jae 0x502a80
mov ecx, ebp
mov ebp, dword [ebx + 4]
test byte [esp + 0x3c], 1
movzx ecx, byte [ebp + ecx]
mov byte [esp + 0x28], cl
je 0x502a55
and ecx, 0xf
mov ebp, dword [esp + 0x3c]
add ebp, 1
mov dword [esp + 0x18], ebp
mov dword [ebx + edx*4], ebp
movzx ebp, cl
cmp ebp, 3
ja 0x5026b8
mov ecx, dword [esp + 0x18]
shl ebp, 4
mov dword [esp + 0x3c], ebp
shr ecx, 1
cmp ecx, eax
mov dword [esp + 0x28], ecx
jb 0x502ac6
mov dword [esp + 8], str.SPUdec:_ERROR:_get_nibble_past_end_of_packet_n
xor ebp, ebp
mov dword [esp + 4], 2
mov dword [esp], 0x1a
call fcn.0042b9b0
mov eax, dword [ebx + 0x2c]
mov esi, dword [ebx + 0x38]
jmp 0x502aef
shr al, 4
jmp 0x5026de
mov dword [esp + 8], str.SPUdec:_ERROR:_get_nibble_past_end_of_packet_n
mov dword [esp + 4], 2
mov dword [esp], 0x1a
call fcn.0042b9b0
xor eax, eax
or ebp, eax
jmp 0x50267c
mov eax, dword [esi + 0xbc]
mov dword [esp], eax
call fcn.008f2ba8
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 0x48]
mov ecx, dword [ebx + 4]
mov dword [esi + 0xb8], eax
mov eax, dword [ebx + 0x4c]
mov edi, edx
mov dword [esi + 0xbc], ecx
imul edi, eax
add ecx, edi
mov dword [esi + 0xc0], ecx
mov ecx, dword [ebx + 0x44]
mov dword [ebx + 4], 0
mov dword [esi + 0xb4], eax
mov eax, dword [ebx + 0x3c]
mov dword [esi + 0xb0], edx
mov dword [esi + 0xac], ecx
mov dword [esi + 0xa4], eax
mov eax, dword [ebx + 0x40]
mov dword [esi + 0xd8], 0
mov dword [esi + 0xdc], 0
mov dword [esi + 0xa8], eax
xor eax, eax
jmp 0x502715
mov ebp, dword [esi + 0xbc]
test ebp, ebp
je 0x502712
jmp 0x5024fb
mov edi, dword [esp + 0x1c]
xor eax, eax
mov ecx, 0x10
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x5028e3
mov eax, dword [ebx + 0xc]
mov dword [esp + eax*4 + 0x40], 1
mov edx, dword [ebx + 0x20]
test edx, edx
je 0x5028f5
mov eax, dword [ebx + 0x10]
mov dword [esp + eax*4 + 0x40], 1
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x502907
mov eax, dword [ebx + 0x14]
mov dword [esp + eax*4 + 0x40], 1
mov ebp, dword [ebx + 0x28]
test ebp, ebp
je 0x502919
mov eax, dword [ebx + 0x18]
mov dword [esp + eax*4 + 0x40], 1
xor ecx, ecx
mov edi, dword [esp + 0x7c]
cmp dword [esp + 0x40], 0
setne cl
cmp dword [esp + 0x44], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x48], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x4c], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x50], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x54], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x58], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x5c], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x60], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x64], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x68], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x6c], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x70], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x74], 1
sbb ecx, 0xffffffff
cmp dword [esp + 0x78], 1
sbb ecx, 0xffffffff
test edi, edi
je 0x502a70
add ecx, 1
cmp ecx, 1
mov ebp, pe_nt_image_headers32
mov dword [esp + 0x2c], 0
je 0x5029cf
mov ebp, dword [esi + 0x104]
mov eax, 0xf0
sub ecx, 1
sub eax, ebp
mov edx, eax
sar edx, 0x1f
idiv ecx
mov dword [esp + 0x2c], eax
mov edi, dword [esp + 0x1c]
xor eax, eax
mov ecx, 0x10
rep stosd dword es:[edi], eax
mov edx, dword [ebx + 0x1c]
mov eax, dword [ebx + 0xc]
test edx, edx
je 0x5029fb
mov edx, ebp
add ebp, dword [esp + 0x2c]
shl edx, 0x10
mov dword [esp + eax*4 + 0x40], 1
mov dword [esi + eax*4 + 8], edx
mov edi, dword [ebx + 0x20]
mov eax, dword [ebx + 0x10]
test edi, edi
je 0x502a11
mov ecx, dword [esp + eax*4 + 0x40]
test ecx, ecx
je 0x502b31
mov edx, dword [ebx + 0x24]
mov eax, dword [ebx + 0x14]
test edx, edx
je 0x502a27
mov edi, dword [esp + eax*4 + 0x40]
test edi, edi
je 0x502b17
mov ecx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x18]
test ecx, ecx
je 0x502444
mov edx, dword [esp + eax*4 + 0x40]
test edx, edx
jne 0x502444
shl ebp, 0x10
mov dword [esp + eax*4 + 0x40], 1
mov dword [esi + eax*4 + 8], ebp
jmp 0x502444
shr cl, 4
jmp 0x5027a6
mov dword [esi + 4], 0
jmp 0x50241d
test ecx, ecx
je 0x502444
jmp 0x5029a2
mov dword [esp + 8], str.SPUdec:_ERROR:_get_nibble_past_end_of_packet_n
mov dword [esp + 4], 2
mov dword [esp], 0x1a
call fcn.0042b9b0
mov esi, dword [ebx + 0x38]
lea edx, [esi + 0xc]
mov eax, dword [ebx + edx*4]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x2c]
shr ecx, 1
cmp ecx, eax
mov dword [esp + 0x28], ecx
jae 0x5027d9
mov ebp, ecx
mov ecx, dword [ebx + 4]
test byte [esp + 0x18], 1
movzx ecx, byte [ecx + ebp]
mov byte [esp + 0x28], cl
je 0x502b10
and ecx, 0xf
mov ebp, ecx
mov ecx, dword [esp + 0x18]
and ebp, 0xff
add ecx, 1
mov dword [ebx + edx*4], ecx
lea edx, [esi + 0xc]
mov ecx, dword [ebx + edx*4]
or ebp, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
jmp 0x5026b8
mov esi, ecx
jmp 0x5026fa
shr cl, 4
mov ebp, ecx
jmp 0x502adf
mov edx, ebp
shl edx, 0x10
mov dword [esp + eax*4 + 0x40], 1
add ebp, dword [esp + 0x2c]
mov dword [esi + eax*4 + 8], edx
jmp 0x502a27
mov edx, ebp
shl edx, 0x10
mov dword [esp + eax*4 + 0x40], 1
add ebp, dword [esp + 0x2c]
mov dword [esi + eax*4 + 8], edx
jmp 0x502a11