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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, eax
mov ebp, dword [eax + 0x10]
cmp byte [ebp + 0x15], 4
jbe 0x505540
xor eax, eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
mov al, byte [ebp + 0x15]
jmp dword [eax*4 + 0x717264]
mov ecx, 0x28
mov edx, dword [ebp + 0x20]
mov eax, ebx
mov esi, dword [ebp + 0x44]
call fcn.00505130
mov dword [ebp + 0x20], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x505801
mov eax, dword [ebp + 0x44]
mov edx, dword [ebp + 0x48]
sub eax, esi
add edx, eax
mov eax, 0x190
mov dword [ebp + 0x48], edx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp + 0x30]
test edi, edi
je 0x505630
mov eax, ebx
call fcn.005052a0
mov edx, dword [ebp + 0x48]
mov eax, 0x64
cmp edx, 0x64
jbe 0x505534
sub edx, 0x64
mov dword [ebp + 0x48], edx
jmp 0x505534
lea eax, [ebx + 0x10]
call fcn.005053d0
add esp, 0x2c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp + 0x24]
test esi, esi
je 0x505642
add esp, 0x2c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00504b80
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp]
mov ecx, 0xfffffffd
mov esi, dword [ebp + 0x44]
lea edx, [edx + eax*4]
inc eax
mov dword [ebp + 0x18], eax
mov eax, ebx
call fcn.00505130
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x18], eax
jl 0x50560f
mov byte [ebp + 0x15], 3
mov eax, dword [ebp + 0x44]
mov ebx, dword [ebp + 0x48]
sub eax, esi
add ebx, eax
mov eax, 0xa
mov dword [ebp + 0x48], ebx
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [ebp + 0x15], 0
mov dword [ebp + 0x4c], 0
xor eax, eax
jmp 0x505534
mov esi, dword [ebp + 0x8c]
lea edi, [ebp + 0x78]
cmp esi, edi
je 0x505677
nop
test byte [esi + 5], 7
jne 0x505670
mov edx, dword [esi + 8]
cmp dword [edx + 8], 3
jle 0x505670
mov edx, dword [edx]
test byte [edx + 5], 3
jne 0x5057f5
nop
lea esi, [esi]
mov esi, dword [esi + 0x14]
cmp esi, edi
jne 0x505650
mov eax, ebp
call fcn.00505100
mov eax, dword [ebp + 0x2c]
mov dword [ebp + 0x24], eax
mov dword [ebp + 0x2c], 0
test byte [ebx + 5], 3
je 0x50569a
mov edx, ebx
mov eax, ebp
call fcn.00504a70
mov eax, ebp
call fcn.00504b40
mov eax, ebp
call fcn.00505100
mov eax, dword [ebp + 0x28]
mov dword [ebp + 0x24], eax
mov dword [ebp + 0x28], 0
mov eax, ebp
call fcn.00505100
mov dword [esp], ebx
mov dword [esp + 4], 0
call fcn.00505460
mov ebx, dword [ebp + 0x30]
mov dword [esp + 0x14], eax
test ebx, ebx
je 0x5056f8
mov ebx, dword [ebx]
mov dl, byte [ebp + 0x14]
and edx, 3
mov eax, ebp
mov cl, byte [ebx + 5]
and ecx, 0xfffffff8
or edx, ecx
mov byte [ebx + 5], dl
mov edx, ebx
call fcn.00504a70
cmp ebx, dword [ebp + 0x30]
jne 0x5056d7
mov eax, ebp
call fcn.00505100
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x5057af
mov dword [esp + 0x1c], ebp
mov ebp, eax
mov esi, dword [ebp + 0x1c]
test byte [ebp + 5], 0x10
je 0x50574a
dec esi
mov edi, esi
shl edi, 4
jmp 0x505745
mov ebx, dword [ebp + 0xc]
xor ecx, ecx
add ebx, edi
mov edx, dword [ebx + 8]
mov eax, dword [ebx]
call fcn.00505390
test eax, eax
je 0x505741
mov dword [ebx + 8], 0
dec esi
sub edi, 0x10
cmp esi, 0xffffffff
jne 0x505725
xor ecx, ecx
mov esi, 1
mov cl, byte [ebp + 7]
shl esi, cl
dec esi
mov edi, esi
shl edi, 5
jmp 0x505764
dec esi
sub edi, 0x20
cmp esi, 0xffffffff
je 0x5057a0
mov ebx, dword [ebp + 0x10]
add ebx, edi
mov eax, dword [ebx + 8]
test eax, eax
je 0x505760
mov edx, dword [ebx + 0x18]
mov eax, dword [ebx + 0x10]
mov ecx, 1
call fcn.00505390
test eax, eax
je 0x5057e0
mov dword [ebx + 8], 0
cmp dword [ebx + 0x18], 3
jle 0x505760
mov dword [ebx + 0x18], 0xb
jmp 0x505760
mov ebp, dword [ebp + 0x18]
test ebp, ebp
jne 0x505714
mov ebp, dword [esp + 0x1c]
lea eax, [ebp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x44]
sub eax, edx
mov ecx, dword [esp + 0x18]
sub eax, ecx
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x48], eax
mov byte [ebp + 0x15], 2
xor byte [ebp + 0x14], 3
xor eax, eax
jmp 0x505534
xor ecx, ecx
mov edx, dword [ebx + 8]
mov eax, dword [ebx]
call fcn.00505390
test eax, eax
jne 0x505789
jmp 0x505760
mov eax, ebp
call fcn.00504a70
jmp 0x505670
mov edi, dword [ebx + 0x10]
mov edx, dword [edi + 8]
mov eax, edx
sar eax, 0x1f
shr eax, 0x1e
add eax, edx
sar eax, 2
cmp dword [edi + 4], eax
jae 0x50581e
cmp edx, 0x40
jg 0x505858
mov eax, dword [edi + 0x3c]
cmp eax, 0x40
jbe 0x50584f
mov edx, eax
mov dword [esp + 8], eax
shr edx, 1
mov dword [esp + 0xc], edx
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 0x10], edx
call fcn.00509400
mov edx, dword [esp + 0x10]
mov dword [edi + 0x34], eax
mov dword [edi + 0x3c], edx
mov byte [ebp + 0x15], 4
jmp 0x50556f
sar edx, 1
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.00508b80
jmp 0x50581e