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

Disassembly:
sub esp, 0x108
mov eax, dword [0x597670]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push edi
call dword [0x5693d8]
xor esi, esi
mov edi, eax
cmp edi, esi
mov dword [esp + 0x18], edi
mov dword [0x76bb64], esi
mov dword [esp + 0x10], esi
jle 0x50d63b
push ebx
mov ebx, dword [0x5693dc]
push ebp
lea ebp, [esi + 1]
push 0
push 0
push 0
push esi
lea eax, [esp + 0x20]
push eax
call dword [0x5693e0]
test eax, eax
jne 0x50d62b
mov edx, dword [esp + 0x10]
push 0x30
lea ecx, [esp + 0xe8]
push ecx
push edx
call dword [0x5693e4]
test eax, eax
je 0x50d3e4
mov eax, dword [esp + 0x10]
push eax
call dword [0x5693e8]
jmp 0x50d62b
xor esi, esi
cmp dword [esp + 0x110], esi
mov dword [esp + 0x14], esi
jle 0x50d60f
jmp 0x50d400
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x40]
push ecx
push edx
mov dword [esp + 0x48], 0xa8
mov dword [esp + 0x4c], esi
call ebx
test eax, eax
jne 0x50d5fc
mov eax, dword [esp + 0x5c]
xor edi, edi
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x50d5f3
mov ecx, dword [esp + 0x10]
push ebp
lea eax, [esp + 0x40]
push eax
push ecx
mov dword [esp + 0x48], 0xa8
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], edi
call ebx
test eax, eax
jne 0x50d5e3
test dword [esp + 0x4c], 0x80000000
je 0x50d5da
cmp dword [esp + 0x54], 0x1005
je 0x50d49b
mov esi, dword [0x5690fc]
push 0x56c740
lea edx, [esp + 0x78]
push edx
call esi
test eax, eax
je 0x50d49b
push str.CD_Digital
lea eax, [esp + 0x78]
push eax
call esi
test eax, eax
jne 0x50d5da
mov edx, dword [esp + 0x10]
push 2
lea ecx, [esp + 0x40]
push ecx
push edx
mov dword [esp + 0x48], 0xa8
call ebx
test eax, eax
jne 0x50d5e3
mov eax, dword [esp + 0x60]
test eax, eax
je 0x50d5e3
xor ecx, ecx
mov edx, 0x94
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0050e9ea
mov ecx, dword [esp + 0x64]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x48]
push 0
lea edx, [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
push edx
push eax
mov dword [esp + 0x30], 0x18
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], 0x94
mov dword [esp + 0x44], esi
call dword [0x5693ec]
test eax, eax
je 0x50d528
push esi
call fcn.0050e924
add esp, 4
jmp 0x50d5e3
mov edx, dword [esp + 0x30]
xor ecx, ecx
test edx, edx
jle 0x50d5d1
lea eax, [esi + 8]
lea esp, [esp]
cmp dword [eax], 0x50030001
je 0x50d555
add ecx, ebp
add eax, 0x94
cmp ecx, edx
jl 0x50d540
jmp 0x50d5d1
mov edx, dword [0x76bb64]
imul ecx, ecx, 0x94
mov eax, dword [esp + 0x18]
mov dword [edx*4 + 0x76b898], eax
lea eax, [edx + edx*2]
lea eax, [eax*8 + 0x76b298]
mov dword [eax], 0x18
mov ebx, dword [ecx + esi + 4]
add ecx, esi
mov dword [eax + 4], ebx
mov dword [eax + 8], ebp
mov ecx, dword [ecx + 0x10]
push 0
lea edx, [edx*4 + 0x76b198]
push eax
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], 4
mov dword [eax + 0x14], edx
mov eax, dword [esp + 0x18]
push eax
call dword [0x5693f0]
mov ebx, dword [0x5693dc]
test eax, eax
jne 0x50d5d1
mov eax, dword [0x76bb64]
mov ecx, dword [eax*4 + 0x76b198]
mov dword [eax*4 + 0x76b098], ecx
add eax, ebp
mov dword [0x76bb64], eax
push esi
call fcn.0050e924
add esp, 4
cmp dword [0x76bb64], 0x40
jge 0x50d60f
mov esi, dword [esp + 0x14]
add edi, ebp
cmp edi, dword [esp + 0x1c]
jl 0x50d434
cmp dword [0x76bb64], 0x40
jge 0x50d60f
add esi, ebp
cmp esi, dword [esp + 0x110]
mov dword [esp + 0x14], esi
jl 0x50d400
mov edx, dword [esp + 0x10]
push edx
call dword [0x5693e8]
cmp dword [0x76bb64], 0x40
jge 0x50d639
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
add esi, ebp
cmp esi, edi
mov dword [esp + 0x18], esi
jl 0x50d3a1
pop ebp
pop ebx
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
xor ecx, esp
call fcn.0050f0b5
add esp, 0x108
ret