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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [ebp - 0x10], eax
mov esi, dword [eax + 0x10]
xor eax, eax
movzx edx, byte [esi + 0x15]
cmp edx, 4
ja case.default.0x510646
jmp dword [edx*4 + 0x67a818]
mov eax, dword [ebp - 0x10]
call fcn.005105b8
jmp 0x510914
cmp dword [esi + 0x24], 0
je 0x51066e
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.0050feaa
mov ebx, dword [esi + 0x8c]
lea eax, [esi + 0x78]
cmp ebx, eax
je 0x5106a4
movzx eax, byte [ebx + 5]
test al, 4
jne 0x51069f
test al, 3
jne 0x51069f
mov eax, dword [ebx + 8]
cmp dword [eax + 8], 3
jle 0x51069f
mov edx, dword [eax]
test byte [edx + 5], 3
je 0x51069f
mov eax, esi
call fcn.0050fd82
mov ebx, dword [ebx + 0x14]
jmp 0x510674
mov eax, esi
call fcn.005102f0
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x2c], 0
test byte [eax + 5], 3
je 0x5106ca
mov edx, eax
mov eax, esi
call fcn.0050fd82
mov eax, esi
call fcn.0051058d
mov eax, esi
call fcn.005102f0
mov eax, dword [esi + 0x28]
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], 0
mov eax, esi
call fcn.005102f0
push 0
push dword [ebp - 0x10]
call fcn.0050fe10
pop ebx
mov ebx, dword [esi + 0x30]
pop edi
test ebx, ebx
mov dword [ebp - 0x14], eax
je 0x510723
mov ebx, dword [ebx]
mov dl, byte [esi + 0x14]
and edx, 3
mov al, byte [ebx + 5]
and eax, 0xfffffff8
or eax, edx
mov edx, ebx
mov byte [ebx + 5], al
mov eax, esi
call fcn.0050fd82
cmp ebx, dword [esi + 0x30]
jmp 0x510700
mov eax, esi
call fcn.005102f0
mov edx, dword [esi + 0x2c]
add dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
test edx, edx
je 0x5107ea
mov edi, dword [ebp - 0x18]
mov ebx, dword [edi + 0x1c]
test byte [edi + 5], 0x10
je 0x51077e
dec ebx
cmp ebx, 0xffffffff
je 0x51077e
mov edi, ebx
shl edi, 4
mov eax, dword [ebp - 0x18]
mov edx, dword [eax + 0xc]
add edx, edi
mov dword [ebp - 0x1c], edx
xor edx, edx
mov eax, dword [ebp - 0x1c]
call fcn.00510310
test eax, eax
je 0x510775
mov eax, dword [ebp - 0x1c]
mov dword [eax + 8], 0
dec ebx
sub edi, 0x10
cmp ebx, 0xffffffff
jne 0x510752
mov edx, dword [ebp - 0x18]
mov ebx, 1
movzx ecx, byte [edx + 7]
shl ebx, cl
dec ebx
cmp ebx, 0xffffffff
je 0x5107df
mov edi, ebx
shl edi, 5
mov dword [ebp - 0x24], edi
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x24]
add edi, dword [eax + 0x10]
cmp dword [edi + 8], 0
je 0x5107d5
lea eax, [edi + 0x10]
mov edx, 1
call fcn.00510310
test eax, eax
jne 0x5107c7
xor edx, edx
mov eax, edi
call fcn.00510310
test eax, eax
je 0x5107d5
mov dword [edi + 8], 0
mov eax, edi
call fcn.0050fd70
dec ebx
sub dword [ebp - 0x24], 0x20
cmp ebx, 0xffffffff
jne 0x51079a
mov edx, dword [ebp - 0x18]
mov edx, dword [edx + 0x18]
jmp 0x510730
xor byte [esi + 0x14], 3
lea eax, [esi + 0x1c]
mov byte [esi + 0x15], 2
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x44]
sub eax, dword [ebp - 0x14]
mov dword [esi + 0x18], 0
mov dword [esi + 0x48], eax
jmp 0x510914
mov eax, dword [esi + 0x18]
mov edx, dword [esi]
mov ebx, dword [esi + 0x44]
lea edx, [edx + eax*4]
inc eax
mov dword [esi + 0x18], eax
push 0xfffffffffffffffd
mov eax, dword [ebp - 0x10]
call fcn.0051034e
mov eax, dword [esi + 8]
pop ecx
cmp dword [esi + 0x18], eax
jl 0x510833
mov byte [esi + 0x15], 3
sub ebx, dword [esi + 0x44]
mov eax, 0xa
sub dword [esi + 0x48], ebx
jmp case.default.0x510646
mov edi, dword [esi + 0x44]
mov edx, dword [esi + 0x20]
mov dword [ebp - 0x20], edi
push 0x28
mov eax, dword [ebp - 0x10]
call fcn.0051034e
mov dword [esi + 0x20], eax
cmp dword [eax], 0
pop edx
jne 0x5108d3
mov eax, dword [ebp - 0x10]
mov edx, 4
mov edi, edx
mov ebx, dword [eax + 0x10]
mov ecx, dword [ebx + 8]
mov eax, ecx
cdq
idiv edi
mov dword [ebp - 0x28], eax
cmp dword [ebx + 4], eax
jae 0x510898
cmp ecx, 0x40
jle 0x510898
mov eax, ecx
mov edx, 2
mov edi, edx
cdq
idiv edi
push eax
push dword [ebp - 0x10]
call fcn.0050d6f0
pop ecx
pop edi
mov eax, dword [ebx + 0x3c]
cmp eax, 0x40
jbe 0x5108cf
mov edi, eax
shr edi, 1
lea eax, [edi + 1]
cmp eax, 0xfffffffd
ja 0x5108c0
push edi
push dword [ebx + 0x3c]
push dword [ebx + 0x34]
push dword [ebp - 0x10]
call fcn.00512e04
add esp, 0x10
jmp 0x5108c9
push dword [ebp - 0x10]
call fcn.00512df0
pop edx
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x3c], edi
mov byte [esi + 0x15], 4
mov eax, dword [esi + 0x44]
sub dword [ebp - 0x20], eax
mov eax, 0x190
mov edx, dword [ebp - 0x20]
sub dword [esi + 0x48], edx
jmp case.default.0x510646
cmp dword [esi + 0x30], 0
je 0x510909
mov eax, dword [ebp - 0x10]
call fcn.0051044c
mov eax, dword [esi + 0x48]
cmp eax, 0x64
jbe 0x510902
sub eax, 0x64
mov dword [esi + 0x48], eax
mov eax, 0x64
jmp case.default.0x510646
mov byte [esi + 0x15], 0
mov dword [esi + 0x4c], 0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret