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

Disassembly:
sub esp, 0x108
mov eax, dword [0x59f740]
xor eax, esp
mov dword [esp + 0x104], eax
push esi
push edi
call dword [0x5713d8]
xor esi, esi
mov edi, eax
cmp edi, esi
mov dword [esp + 0x18], edi
mov dword [0x773c44], esi
mov dword [esp + 0x10], esi
jle 0x5157cb
push ebx
mov ebx, dword [0x5713dc]
push ebp
lea ebp, [esi + 1]
push 0
push 0
push 0
push esi
lea eax, [esp + 0x20]
push eax
call dword [0x5713e0]
test eax, eax
jne 0x5157bb
mov edx, dword [esp + 0x10]
push 0x30
lea ecx, [esp + 0xe8]
push ecx
push edx
call dword [0x5713e4]
test eax, eax
je 0x515574
mov eax, dword [esp + 0x10]
push eax
call dword [0x5713e8]
jmp 0x5157bb
xor esi, esi
cmp dword [esp + 0x110], esi
mov dword [esp + 0x14], esi
jle 0x51579f
jmp 0x515590
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 0x51578c
mov eax, dword [esp + 0x5c]
xor edi, edi
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x515783
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 0x515773
test dword [esp + 0x4c], 0x80000000
je 0x51576a
cmp dword [esp + 0x54], 0x1005
je 0x51562b
mov esi, dword [0x5710fc]
push 0x574780
lea edx, [esp + 0x78]
push edx
call esi
test eax, eax
je 0x51562b
push str.CD_Digital
lea eax, [esp + 0x78]
push eax
call esi
test eax, eax
jne 0x51576a
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 0x515773
mov eax, dword [esp + 0x60]
test eax, eax
je 0x515773
xor ecx, ecx
mov edx, 0x94
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00516b7a
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 [0x5713ec]
test eax, eax
je 0x5156b8
push esi
call fcn.00516ab4
add esp, 4
jmp 0x515773
mov edx, dword [esp + 0x30]
xor ecx, ecx
test edx, edx
jle 0x515761
lea eax, [esi + 8]
lea esp, [esp]
cmp dword [eax], 0x50030001
je 0x5156e5
add ecx, ebp
add eax, 0x94
cmp ecx, edx
jl 0x5156d0
jmp 0x515761
mov edx, dword [0x773c44]
imul ecx, ecx, 0x94
mov eax, dword [esp + 0x18]
mov dword [edx*4 + 0x773978], eax
lea eax, [edx + edx*2]
lea eax, [eax*8 + 0x773378]
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 + 0x773278]
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 [0x5713f0]
mov ebx, dword [0x5713dc]
test eax, eax
jne 0x515761
mov eax, dword [0x773c44]
mov ecx, dword [eax*4 + 0x773278]
mov dword [eax*4 + 0x773178], ecx
add eax, ebp
mov dword [0x773c44], eax
push esi
call fcn.00516ab4
add esp, 4
cmp dword [0x773c44], 0x40
jge 0x51579f
mov esi, dword [esp + 0x14]
add edi, ebp
cmp edi, dword [esp + 0x1c]
jl 0x5155c4
cmp dword [0x773c44], 0x40
jge 0x51579f
add esi, ebp
cmp esi, dword [esp + 0x110]
mov dword [esp + 0x14], esi
jl 0x515590
mov edx, dword [esp + 0x10]
push edx
call dword [0x5713e8]
cmp dword [0x773c44], 0x40
jge 0x5157c9
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
add esi, ebp
cmp esi, edi
mov dword [esp + 0x18], esi
jl 0x515531
pop ebp
pop ebx
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
xor ecx, esp
call fcn.00517235
add esp, 0x108
ret