Function at 0x10040040
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1005cbab
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x10071430]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push esi
push edi
mov eax, dword [0x10071430]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
mov esi, ecx
lea ecx, [esp + 0x14]
push ecx
mov ebx, edx
push 0xc
lea edx, [esp + 0x60]
push edx
push edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x24], 0
call eax
test eax, eax
jne 0x10040560
cmp dword [esp + 0x14], 0xc
jne 0x1004055b
push 4
lea ecx, [esp + 0x5c]
push str.RIFF
push ecx
call fcn.100496b6
add esp, 0xc
test eax, eax
jne 0x1004055b
push 4
lea edx, [esp + 0x64]
push str.WAVE
push edx
call fcn.100496b6
add esp, 0xc
test eax, eax
jne 0x1004055b
lea eax, [esp + 0x58]
push eax
mov edx, 0xc
mov ecx, ebx
call fcn.1003e4b0
add esp, 4
test eax, eax
je 0x10040554
add dword [esi + 0x10], 0xc
mov ebx, 0
push 0x50
adc dword [esi + 0x14], ebx
lea ecx, [esp + 0x68]
push ebx
push ecx
call fcn.1004c5f0
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 8]
add esp, 0xc
mov dword [esp + 0x78], edx
cmp eax, ebx
je 0x10040148
or dword [esp + 0x78], 0x2000000
mov dword [esp + 0x7c], eax
xor eax, eax
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], ebx
mov ebx, 8
push ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
lea edx, [esp + 0x30]
push edx
push edi
call eax
test eax, eax
jne 0x10040560
jmp 0x100401a9
mov edi, dword [esp + 0x20]
mov ebx, 8
cmp dword [esp + 0x14], ebx
jne 0x1004055b
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, ebx
call fcn.1003e4b0
add esp, 4
test eax, eax
je 0x10040554
add dword [esi + 0x10], ebx
mov ebx, 0
mov eax, 0x1006bbd0
adc dword [esi + 0x14], ebx
lea ecx, [esp + 0x28]
call fcn.1002a2f0
push 4
lea edx, [esp + 0x2c]
push str.fmt
push edx
call fcn.100496b6
add esp, 0xc
test eax, eax
jne 0x100403ee
mov eax, dword [esp + 0x2c]
cmp eax, 0x10
jb 0x1004055b
cmp eax, 0x28
ja 0x1004055b
mov ecx, dword [edi]
mov ecx, dword [ecx + 0xc]
lea edx, [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x38]
push eax
push edi
mov dword [esp + 0x20], ebx
call ecx
cmp eax, ebx
jne 0x10040560
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x10], edx
jne 0x1004055b
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
mov edi, edx
call fcn.1003e4b0
add esp, 4
test eax, eax
je 0x10040554
add dword [esi + 0x10], edi
mov eax, str.SSLLSSSSLS
lea ecx, [esp + 0x30]
adc dword [esi + 0x14], ebx
call fcn.1002a2f0
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x10], ebx
cmp ecx, 0x10
jbe 0x10040292
cmp word [esp + 0x40], 2
jne 0x10040292
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x30]
mov edx, 0xfffe
cmp ax, dx
jne 0x100402ac
cmp ecx, 0x28
jne 0x100402ac
movzx eax, word [esp + 0x48]
jmp 0x100402af
movzx eax, ax
movzx eax, ax
mov dword [esp + 0x1c], eax
cmp eax, 1
je 0x100402c4
cmp eax, 3
jne 0x1004055b
movzx eax, word [esp + 0x42]
cmp ecx, 0x28
je 0x100402d3
movzx eax, word [esp + 0x3e]
movzx eax, ax
cmp eax, 1
mov dword [esp + 0x6c], eax
jl 0x1004055b
cmp eax, 0x20
jg 0x1004055b
mov di, word [esp + 0x32]
cmp di, bx
je 0x1004055b
mov eax, pe_nt_image_headers32
cmp di, ax
ja 0x1004055b
movzx eax, word [esp + 0x3c]
cdq
movzx ecx, di
idiv ecx
mov ebx, eax
mov eax, dword [esp + 0x6c]
add eax, 7
mov dword [esp + 0x14], edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp ebx, eax
jl 0x1004055b
cmp ebx, 4
jg 0x1004055b
cmp dword [esp + 0x14], 0
jne 0x1004055b
cmp dword [esp + 0x2c], 0x28
jb 0x10040359
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x94], ecx
jmp 0x10040391
cmp di, 2
ja 0x1004036f
mov edx, 5
sub edx, ecx
mov dword [esp + 0x94], edx
jmp 0x10040391
cmp di, 0x12
ja 0x10040386
mov eax, 1
shl eax, cl
dec eax
mov dword [esp + 0x94], eax
jmp 0x10040391
mov dword [esp + 0x94], 0x3ffff
cmp dword [esp + 0x1c], 3
jne 0x100403a8
mov dword [esp + 0x84], 0x7f
jmp 0x100404a2
cmp dword [esp + 0x10], 0
je 0x100404a2
cmp ebx, 4
jne 0x100404a2
mov eax, dword [esp + 0x6c]
cmp eax, 0x18
jne 0x100403d5
mov dword [esp + 0x84], 0x96
jmp 0x100404a2
cmp eax, 0x20
jne 0x100404a2
mov dword [esp + 0x84], 0x8e
jmp 0x100404a2
push 4
lea ecx, [esp + 0x2c]
push str.data
push ecx
call fcn.100496b6
add esp, 0xc
test eax, eax
je 0x100404cf
mov edi, dword [esp + 0x2c]
inc edi
and edi, 0xfffffffe
test edi, 0xf0000000
ja 0x1004055b
push 0x100732c0
push edi
call fcn.10048539
mov ebx, eax
add esp, 8
mov dword [esp + 0x10], ebx
xor eax, eax
mov dword [esp + 0xc8], eax
cmp ebx, eax
je 0x1004052c
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push edi
push ebx
push eax
call edx
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x1004053c
cmp dword [esp + 0x24], edi
jne 0x1004054b
mov ecx, dword [esp + 0x18]
push ebx
mov edx, edi
call fcn.1003e4b0
add esp, 4
test eax, eax
je 0x1004054b
add dword [esi + 0x10], edi
push ebx
adc dword [esi + 0x14], 0
mov dword [esp + 0xcc], 0xffffffff
call fcn.1004852e
add esp, 4
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push 8
lea edx, [esp + 0x30]
push edx
push eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x24], 0
call eax
test eax, eax
je 0x100401a0
jmp 0x10040560
movzx esi, word [esp + 0x3c]
mov eax, dword [esp + 0x2c]
xor edx, edx
div esi
mov edi, eax
mov ax, word [esp + 0x32]
cmp ax, bx
je 0x1004055b
cmp edi, ebx
je 0x1004055b
movzx ecx, ax
mov eax, esi
cdq
idiv ecx
mov esi, dword [esp + 0x18]
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x64]
push edi
push edx
mov dword [esp + 0x98], ecx
mov dword [esp + 0x78], eax
call fcn.1003dd70
add esp, 8
neg eax
sbb eax, eax
and eax, 0x1ff0ffff
add eax, 0xe00f0001
jmp 0x10040560
lea esi, [esp + 0x10]
call fcn.10005cc0
mov eax, 0x8007000e
jmp 0x10040560
lea esi, [esp + 0x10]
call fcn.10005cc0
mov eax, dword [esp + 0x1c]
jmp 0x10040560
lea esi, [esp + 0x10]
call fcn.10005cc0
mov eax, 0x80004005
jmp 0x10040560
mov eax, 0xe00f0001
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.10047eba
mov esp, ebp
pop ebp
ret 4