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

Disassembly:
sub esp, 0x15c
push ebx
push esi
push edi
mov ebx, ecx
mov esi, dword [esp + 0x170]
push ebp
xor ecx, ecx
lea eax, [esp + 0x28]
mov dword [esp + 0x24], ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dl, byte [ebx + 9]
test dl, dl
jne 0x5058b1
mov eax, dword [ebx + 4]
test eax, eax
je 0x5052b3
mov esi, 0xffffffff
mov ebx, eax
jmp 0x505285
mov eax, dword [ebx]
test eax, eax
je 0x5058b1
push 1
push 0xba
push 0xba
call fcn.004143f0
add esp, 0xc
mov al, byte [ebx + 8]
test al, al
je 0x5052df
mov ecx, ebx
call fcn.005058c0
mov eax, dword [esp + 0x170]
test eax, eax
je 0x5052fd
lea ecx, [ebx + 0xa]
push 0xc
push eax
push ecx
call fcn.0051a2b0
mov byte [ebx + 0x16], 0
add esp, 0xc
mov cl, byte [ebx + 0xa]
lea eax, [ebx + 0xa]
test cl, cl
jne 0x50531d
push 1
push 0x5f
push 0xba
call fcn.004143f0
add esp, 0xc
jmp 0x5058b1
cmp esi, 0xffffffff
jg 0x505325
mov esi, dword [ebx + 0x18]
mov cl, byte [0x54de1c]
test cl, cl
jne 0x505337
test esi, esi
jge 0x50562f
lea ecx, [esp + 0x68]
push eax
mov eax, dword [ebx]
add eax, 0x1c
push eax
push 0x5430c4
push ecx
call fcn.00519a30
lea ecx, [esp + 0x78]
add esp, 0x10
push 0
push 0
push ecx
call fcn.00519e70
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x50562f
lea eax, [esp + 0x38]
push 0x2c
push eax
push edi
call fcn.00519b20
add esp, 0xc
test eax, eax
jne 0x505392
mov byte [ebx + 9], 1
push edi
call fcn.0051b430
add esp, 4
jmp 0x50588d
lea eax, [esp + 0x38]
push 4
push str.RIFF
push eax
call fcn.0051c800
add esp, 0xc
test eax, eax
jne 0x50561d
cmp word [esp + 0x4c], 1
jne 0x50561d
mov eax, dword [esp + 0x60]
push eax
mov dword [ebx + 0x38], eax
call fcn.00513ee0
add esp, 4
mov dword [ebx + 0x2c], eax
test eax, eax
jne 0x5053e3
mov byte [ebx + 9], 1
push edi
call fcn.0051b430
add esp, 4
jmp 0x50588d
mov ecx, dword [ebx + 0x38]
push ecx
push eax
push edi
call fcn.00519b20
add esp, 0xc
test eax, eax
jne 0x50541a
mov byte [ebx + 9], 1
mov eax, dword [ebx + 0x2c]
push eax
call fcn.00514010
add esp, 4
mov dword [ebx + 0x2c], 0
push edi
call fcn.0051b430
add esp, 4
jmp 0x50588d
push edi
call fcn.0051b430
add esp, 4
push 0x12
call fcn.00513ee0
add esp, 4
mov dword [ebx + 0x30], eax
test eax, eax
jne 0x505450
mov byte [ebx + 9], 1
mov eax, dword [ebx + 0x2c]
push eax
call fcn.00514010
mov dword [ebx + 0x2c], 0
add esp, 4
jmp 0x50588d
mov cx, word [esp + 0x4c]
mov word [eax], cx
mov ax, word [esp + 0x4e]
mov edx, dword [ebx + 0x30]
mov word [edx + 2], ax
mov edx, dword [ebx + 0x30]
mov ebp, dword [esp + 0x50]
mov dword [edx + 4], ebp
mov edx, dword [ebx + 0x30]
mov ecx, dword [esp + 0x54]
mov dword [edx + 8], ecx
mov edx, dword [ebx + 0x30]
mov ax, word [esp + 0x58]
xor esi, esi
mov word [edx + 0xc], ax
mov edx, dword [ebx + 0x30]
mov bp, word [esp + 0x5a]
mov word [edx + 0xe], bp
mov edx, dword [ebx + 0x30]
mov word [edx + 0x10], si
mov dword [esp + 0x24], 0x14
mov dword [esp + 0x28], 0xe2
mov eax, dword [ebx + 0x38]
lea ebp, [ebx + 0x34]
mov dword [esp + 0x2c], eax
push esi
mov dword [esp + 0x34], esi
push ebp
mov edx, dword [ebx + 0x30]
mov dword [esp + 0x3c], edx
mov ecx, dword [ebx]
mov eax, dword [ecx + 8]
lea ecx, [esp + 0x2c]
push ecx
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
test eax, eax
je 0x5054fe
mov byte [ebx + 9], 1
mov dword [ebp], esi
mov eax, dword [ebx + 0x30]
push eax
call fcn.00514010
add esp, 4
mov dword [ebx + 0x30], esi
mov eax, dword [ebx + 0x2c]
push eax
call fcn.00514010
add esp, 4
mov dword [ebx + 0x2c], esi
jmp 0x50588d
mov ecx, dword [ebp]
push 0
lea eax, [esp + 0x14]
lea edx, [esp + 0x1c]
lea esi, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push edx
push esi
mov edx, dword [ebx + 0x38]
push eax
mov esi, dword [ecx]
push edx
push 0
push ecx
call dword [esi + 0x2c]
test eax, eax
jne 0x5055de
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov esi, dword [ebx + 0x2c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x505569
mov eax, ecx
mov esi, dword [ebx + 0x2c]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
add esi, ecx
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push eax
mov ebp, dword [esp + 0x18]
push edx
mov eax, dword [esp + 0x24]
push ebp
push eax
mov esi, dword [ecx]
push ecx
call dword [esi + 0x4c]
mov ecx, dword [ebx + 0x30]
push ecx
call fcn.00514010
mov dword [ebx + 0x30], 0
add esp, 4
mov eax, dword [ebx + 0x2c]
push eax
call fcn.00514010
mov dword [ebx + 0x2c], 0
add esp, 4
mov byte [ebx + 8], 1
push 1
push 0x5f
push 0xba
call fcn.004143f0
add esp, 0xc
mov eax, dword [0x547328]
push str._LSf
push eax
call fcn.0042ed50
add esp, 8
mov eax, 1
jmp 0x5058b3
mov byte [ebx + 9], 1
mov eax, dword [ebp]
push eax
mov esi, dword [eax]
call dword [esi + 8]
mov dword [ebp], 0
mov ecx, dword [ebx + 0x30]
push ecx
call fcn.00514010
mov dword [ebx + 0x30], 0
add esp, 4
mov eax, dword [ebx + 0x2c]
push eax
call fcn.00514010
mov dword [ebx + 0x2c], 0
add esp, 4
jmp 0x50588d
mov byte [ebx + 9], 1
push edi
call fcn.0051b430
add esp, 4
jmp 0x50588d
cmp esi, 0xffffffff
jle 0x505889
lea eax, [esp + 0x64]
lea ecx, [esp + 0x20]
push eax
push ecx
push esi
push 0x77617620
call fcn.00497b00
add esp, 0x10
mov ebp, eax
test ebp, ebp
je 0x505889
lea edi, [esp + 0x38]
mov esi, ebp
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x60]
push eax
mov dword [ebx + 0x38], eax
call fcn.00513ee0
add esp, 4
mov edi, eax
mov dword [ebx + 0x2c], eax
test edi, edi
jne 0x50569f
mov byte [ebx + 9], 1
mov eax, dword [esp + 0x20]
cmp eax, 1
jne 0x50588d
push ebp
call fcn.00514010
add esp, 4
jmp 0x50588d
mov eax, dword [ebx + 0x38]
lea esi, [ebp + 0x2c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
cmp ecx, 1
jne 0x5056c5
push ebp
call fcn.00514010
add esp, 4
push 0x12
call fcn.00513ee0
add esp, 4
mov ecx, eax
mov dword [ebx + 0x30], eax
test ecx, ecx
jne 0x5056f7
mov byte [ebx + 9], 1
mov eax, dword [esp + 0x20]
cmp eax, 1
jne 0x50588d
push ebp
call fcn.00514010
add esp, 4
jmp 0x50588d
mov ax, word [esp + 0x4c]
mov word [ecx], ax
mov ecx, dword [ebx + 0x30]
mov dx, word [esp + 0x4e]
mov word [ecx + 2], dx
mov ecx, dword [ebx + 0x30]
mov ebp, dword [esp + 0x50]
mov dword [ecx + 4], ebp
mov ecx, dword [ebx + 0x30]
mov eax, dword [esp + 0x54]
mov dword [ecx + 8], eax
mov ecx, dword [ebx + 0x30]
mov dx, word [esp + 0x58]
xor esi, esi
mov word [ecx + 0xc], dx
mov ecx, dword [ebx + 0x30]
mov ax, word [esp + 0x5a]
mov word [ecx + 0xe], ax
mov ecx, dword [ebx + 0x30]
mov word [ecx + 0x10], si
mov dword [esp + 0x24], 0x14
mov dword [esp + 0x28], 0xe2
mov eax, dword [ebx + 0x38]
lea ebp, [ebx + 0x34]
mov dword [esp + 0x2c], eax
push esi
mov dword [esp + 0x34], esi
push ebp
mov ecx, dword [ebx + 0x30]
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x2c]
mov edx, dword [ebx]
push ecx
mov eax, dword [edx + 8]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
test eax, eax
je 0x505796
mov byte [ebx + 9], 1
mov dword [ebp], esi
mov eax, dword [ebx + 0x30]
push eax
call fcn.00514010
add esp, 4
mov dword [ebx + 0x30], esi
jmp 0x50588d
mov ecx, dword [ebp]
push 0
lea eax, [esp + 0x14]
lea edx, [esp + 0x1c]
lea esi, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push edx
push esi
mov edx, dword [ebx + 0x38]
push eax
mov esi, dword [ecx]
push edx
push 0
push ecx
call dword [esi + 0x2c]
test eax, eax
jne 0x505860
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov esi, dword [ebx + 0x2c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x505801
mov eax, ecx
mov esi, dword [ebx + 0x2c]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
add esi, ecx
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push eax
mov ebp, dword [esp + 0x18]
push edx
mov eax, dword [esp + 0x24]
push ebp
push eax
mov esi, dword [ecx]
push ecx
call dword [esi + 0x4c]
mov ecx, dword [ebx + 0x30]
push ecx
call fcn.00514010
mov dword [ebx + 0x30], 0
add esp, 4
mov byte [ebx + 8], 1
push 1
push 0x5f
push 0xba
call fcn.004143f0
add esp, 0xc
mov eax, dword [0x547328]
push str._LSf
push eax
call fcn.0042ed50
add esp, 8
mov eax, 1
jmp 0x5058b3
mov byte [ebx + 9], 1
mov eax, dword [ebp]
push eax
mov esi, dword [eax]
call dword [esi + 8]
mov dword [ebp], 0
mov ecx, dword [ebx + 0x30]
push ecx
call fcn.00514010
mov dword [ebx + 0x30], 0
add esp, 4
jmp 0x50588d
mov byte [ebx + 9], 1
push 1
push 0x5f
push 0xba
call fcn.004143f0
add esp, 0xc
mov eax, dword [0x547328]
push str._LSf
push eax
call fcn.0042ed50
add esp, 8
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x15c
ret 8