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

Disassembly:
push ebp
xor edx, edx
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, eax
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x18], eax
mov dl, byte [eax + 0x15]
xor eax, eax
cmp edx, 4
ja case.default.0x50811d
jmp dword [edx*4 + 0x76b23c]
mov eax, dword [ebp - 0x18]
sub esp, 0xc
mov edx, eax
mov ebx, dword [eax + 0x44]
mov ecx, edx
mov eax, dword [eax + 0x18]
mov edx, dword [edx]
lea edx, [edx + eax*4]
inc eax
mov dword [ecx + 0x18], eax
mov eax, esi
push 0xfffffffffffffffd
call fcn.00507d70
mov edx, dword [ebp - 0x18]
add esp, 0x10
mov eax, dword [edx + 8]
cmp dword [edx + 0x18], eax
jl 0x508158
mov byte [edx + 0x15], 3
mov ecx, dword [ebp - 0x18]
mov eax, 0xa
mov edi, dword [ecx + 0x44]
mov esi, dword [ecx + 0x48]
sub ebx, edi
sub esi, ebx
mov dword [ecx + 0x48], esi
lea esi, [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x30]
test eax, eax
jne 0x508462
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov byte [ecx + 0x15], 0
mov dword [ecx + 0x4c], 0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, esi
call fcn.00508070
xor eax, eax
jmp 0x508196
mov edx, dword [ebp - 0x18]
mov ebx, dword [edx + 0x24]
test ebx, ebx
jne 0x50842b
mov ecx, dword [ebp - 0x18]
mov edi, ecx
mov ebx, dword [ecx + 0x8c]
add edi, 0x78
cmp edi, ebx
je 0x508293
xor eax, eax
mov al, byte [ebx + 5]
test al, 4
jne 0x5081f0
test al, 3
jne 0x5081f0
mov eax, dword [ebx + 8]
cmp dword [eax + 8], 3
jle 0x5081f0
mov edx, dword [eax]
test byte [edx + 5], 3
jne 0x5083d8
nop
mov ebx, dword [ebx + 0x14]
jmp 0x5081c5
mov eax, dword [ebp - 0x18]
sub esp, 0xc
mov edx, dword [eax + 0x20]
mov edi, dword [eax + 0x44]
mov eax, esi
push 0x28
call fcn.00507d70
mov edx, dword [ebp - 0x18]
add esp, 0x10
mov ebx, dword [eax]
mov dword [edx + 0x20], eax
test ebx, ebx
jne 0x508276
mov ebx, dword [esi + 0x10]
mov edx, dword [ebx + 8]
mov eax, edx
test edx, edx
js 0x5083f7
sar eax, 2
cmp dword [ebx + 4], eax
jae 0x50823a
cmp edx, 0x40
jg 0x508447
mov eax, dword [ebx + 0x3c]
cmp eax, 0x40
jbe 0x50826f
shr eax, 1
mov dword [ebp - 0x14], eax
inc eax
cmp eax, 0xfffffffd
ja 0x508439
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebx + 0x3c]
push eax
mov eax, dword [ebx + 0x34]
push eax
push esi
call fcn.0050b300
mov ecx, dword [ebp - 0x14]
add esp, 0x10
mov dword [ebx + 0x34], eax
mov dword [ebx + 0x3c], ecx
mov eax, dword [ebp - 0x18]
mov byte [eax + 0x15], 4
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x44]
sub edi, eax
mov eax, dword [edx + 0x48]
sub eax, edi
mov dword [edx + 0x48], eax
lea esp, [ebp - 0xc]
mov eax, 0x190
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x18]
call fcn.00507cf0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x2c]
mov dword [edx + 0x2c], 0
mov dword [edx + 0x24], eax
test byte [esi + 5], 3
jne 0x5083e8
mov eax, dword [ebp - 0x18]
call fcn.00508030
mov eax, dword [ebp - 0x18]
call fcn.00507cf0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x28]
mov dword [ecx + 0x28], 0
mov dword [ecx + 0x24], eax
mov eax, ecx
call fcn.00507cf0
push ecx
push ecx
push 0
push esi
call fcn.005076c0
add esp, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax + 0x30]
test ebx, ebx
jmp 0x50831b
mov ebx, dword [ebx]
mov ecx, dword [ebp - 0x18]
mov al, byte [ebx + 5]
mov dl, byte [ecx + 0x14]
and edx, 3
and eax, 0xfffffff8
or eax, edx
mov edx, ebx
mov byte [ebx + 5], al
mov eax, ecx
call fcn.005075f0
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x30], ebx
jne 0x5082f6
mov eax, dword [ebp - 0x18]
call fcn.00507cf0
mov edx, dword [ebp - 0x10]
add edx, eax
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x18]
mov edi, dword [edx + 0x2c]
test edi, edi
je 0x5083ff
mov esi, dword [edi + 0x1c]
test byte [edi + 5], 0x10
je 0x508370
dec esi
cmp esi, 0xffffffff
je 0x508370
mov ebx, esi
mov eax, dword [edi + 0xc]
shl ebx, 4
xor edx, edx
add ebx, eax
mov eax, ebx
call fcn.00507d20
test eax, eax
je 0x508344
mov dword [ebx + 8], 0
dec esi
cmp esi, 0xffffffff
jne 0x50834a
mov esi, esi
xor ecx, ecx
mov esi, 1
mov cl, byte [edi + 7]
shl esi, cl
lea esi, [esi]
dec esi
cmp esi, 0xffffffff
je 0x5083d0
mov ebx, esi
mov eax, dword [edi + 0x10]
shl ebx, 5
add ebx, eax
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x508380
lea eax, [ebx + 0x10]
mov edx, 1
call fcn.00507d20
test eax, eax
jne 0x5083b5
xor edx, edx
mov eax, ebx
call fcn.00507d20
test eax, eax
je 0x508380
mov dword [ebx + 8], 0
mov eax, ebx
call fcn.005075d0
dec esi
cmp esi, 0xffffffff
jne 0x508386
lea esi, [esi]
mov edi, dword [edi + 0x18]
jmp 0x508333
mov eax, dword [ebp - 0x18]
call fcn.005075f0
mov ebx, dword [ebx + 0x14]
jmp 0x5081c5
mov edx, esi
mov eax, dword [ebp - 0x18]
call fcn.005075f0
jmp 0x5082b5
lea eax, [edx + 3]
jmp 0x508229
mov ecx, dword [ebp - 0x18]
mov eax, ecx
xor byte [ecx + 0x14], 3
add eax, 0x1c
mov byte [ecx + 0x15], 2
mov dword [ecx + 0x20], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x44]
mov dword [ecx + 0x18], 0
sub eax, edx
mov dword [ecx + 0x48], eax
xor eax, eax
jmp 0x508196
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00507780
sub esp, 0xc
push esi
call fcn.0050b2e0
jmp 0x508263
mov eax, edx
shr eax, 0x1f
push ecx
push ecx
lea eax, [edx + eax]
sar eax, 1
push eax
push esi
call fcn.00504770
add esp, 0x10
jmp 0x50823a
mov eax, esi
call fcn.00507ec0
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x48]
cmp eax, 0x64
jbe 0x50847a
sub eax, 0x64
mov dword [edx + 0x48], eax
mov eax, 0x64
jmp case.default.0x50811d