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

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x1c
push ebx
mov eax, dword [ecx + 0x40]
push esi
cmp eax, 1
push edi
mov eax, 0
adc eax, 0xffffffff
push ebp
and eax, 2
xor ebx, ebx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov eax, dword [ecx + 0x14]
cmp eax, ebx
je 0x4021e3
mov eax, dword [ecx + 0x18]
cmp eax, 2
jne 0x4021e3
mov eax, dword [ecx + 0x1c]
cmp eax, ebx
jne 0x402127
mov eax, dword [esp + 0x10]
lea esi, [esp + 0x1c]
shl eax, 4
mov dword [esp + 0x18], 1
lea edi, [eax + eax*2 + str._t_t_t_t]
mov ecx, 3
mov eax, dword [edi]
sub edx, edx
div ecx
test eax, eax
jle 0x402114
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea edx, [edx + ecx*2]
mov ebp, edx
lea ecx, [edx + edx*2]
lea edx, [ebp + ecx*4]
mov ecx, dword [esp + 0x30]
add edx, ebx
add ebx, eax
mov dword [esp + 0x14], ebx
lea ebp, [edx + edx*2]
lea edx, [ecx + ebp*4 + 0x160]
mov ecx, 3
mov ebp, dword [edx]
mov ebx, dword [esi]
cmp ebx, ebp
jge 0x402107
mov dword [esi], ebp
add edx, 4
dec ecx
jne 0x4020fd
dec eax
jne 0x4020f8
mov ebx, dword [esp + 0x14]
add esi, 4
add edi, 4
lea eax, [esp + 0x2c]
cmp esi, eax
jb 0x4020bf
jmp 0x402240
mov eax, dword [esp + 0x10]
shl eax, 4
mov dword [esp + 0x18], 2
mov esi, dword [eax + eax*2 + 0x43b3d0]
lea edi, [eax + eax*2 + 0x43b3d0]
test esi, esi
jle 0x402174
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
lea edx, [edx + ecx*2]
lea ecx, [edx + edx*4]
lea edx, [edx + ecx*2]
lea eax, [ebx + edx*8]
mov ecx, dword [eax]
mov edx, dword [esp + 0x1c]
cmp edx, ecx
jge 0x40216e
mov dword [esp + 0x1c], ecx
add eax, 4
dec esi
jne 0x402160
xor ebx, ebx
lea esi, [esp + 0x20]
add edi, 4
mov ecx, 3
mov eax, dword [edi]
sub edx, edx
div ecx
test eax, eax
jle 0x4021d3
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea edx, [edx + ecx*2]
mov ebp, edx
lea ecx, [edx + edx*2]
lea edx, [ebp + ecx*4]
mov ecx, dword [esp + 0x30]
add edx, ebx
add ebx, eax
mov dword [esp + 0x14], ebx
lea edx, [edx + edx*2]
lea ebp, [ecx + edx*4 + 0x160]
mov ecx, 3
mov edx, dword [ebp]
mov ebx, dword [esi]
cmp ebx, edx
jge 0x4021c6
mov dword [esi], edx
add ebp, 4
dec ecx
jne 0x4021bb
dec eax
jne 0x4021b6
mov ebx, dword [esp + 0x14]
add esi, 4
add edi, 4
lea eax, [esp + 0x2c]
cmp esi, eax
jb 0x40217d
jmp 0x402240
xor edi, edi
mov eax, dword [esp + 0x10]
shl eax, 4
lea ebx, [esp + 0x1c]
mov dword [esp + 0x18], edi
nop
lea esi, [eax + eax*2 + 0x43b3b0]
mov eax, dword [esi]
test eax, eax
jle 0x402232
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
lea edx, [edx + ecx*2]
mov ebp, edx
lea ecx, [edx + edx*4]
lea edx, [ebp + ecx*2]
mov ecx, dword [esp + 0x30]
lea ebp, [edi + edx*2]
add edi, eax
lea ecx, [ecx + ebp*4]
mov edx, dword [ecx]
mov ebp, dword [ebx]
cmp ebp, edx
jge 0x40222c
mov dword [ebx], edx
add ecx, 4
dec eax
jne 0x402222
add ebx, 4
add esi, 4
lea eax, [esp + 0x2c]
cmp ebx, eax
jb 0x4021fc
mov eax, dword [esp + 0x10]
shl eax, 4
xor esi, esi
lea edx, [esp + 0x1c]
lea ecx, [eax + 0x43b4d0]
mov eax, dword [edx]
mov ebx, dword [ecx]
cmp ebx, eax
jae 0x40225c
inc esi
add edx, 4
add ecx, 4
lea eax, [esp + 0x2c]
cmp edx, eax
jb 0x402253
test esi, esi
jne 0x402341
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
lea eax, [eax + eax*2]
add eax, ecx
mov ecx, dword [esp + 0x34]
shl eax, 4
add eax, 0x43b3b0
lea edi, [ecx + 0x6c]
mov dword [ecx + 0x68], eax
mov ecx, edi
mov eax, dword [edx]
add edx, 4
add ecx, 4
nop
mov ebx, dword [eax*4 + 0x43b6c8]
lea eax, [esp + 0x2c]
mov dword [ecx - 4], ebx
cmp edx, eax
jb 0x402297
mov ebx, dword [edi]
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x70]
mov edi, dword [ecx + 0x74]
mov eax, dword [ecx + 0x78]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4022f9
cmp ecx, 1
je 0x402316
cmp ecx, 2
je 0x402330
push str.intensity_stereo_not_implemented_yet_n
push 0x4af2a8
call fcn.00413150
add esp, 8
push 1
call fcn.00413040
add esp, 4
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
lea ebx, [ebx + ebx*4]
add ebx, edx
mov edx, dword [esp + 0x34]
pop ebp
nop
lea ecx, [edi + ebx*4]
pop edi
lea eax, [eax + ecx*4]
mov dword [edx + 0x10], eax
mov eax, esi
pop esi
pop ebx
add esp, 0x1c
ret
lea eax, [ebx + ebx*4 + 0x64]
mov ecx, dword [esp + 0x34]
add eax, edx
pop ebp
lea edx, [edi + eax*4]
mov eax, esi
pop edi
mov dword [ecx + 0x10], edx
pop esi
pop ebx
add esp, 0x1c
ret
lea eax, [ebx + ebx*2]
mov ecx, dword [esp + 0x34]
add eax, edx
add eax, 0x1f4
mov dword [ecx + 0x10], eax
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret