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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x58
mov eax, dword [esp + 0x7c]
mov ecx, dword [section..data]
xor ecx, esp
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov edi, 0xffffffd4
cmp eax, 0x3e4
jb 0x40345f
mov ebp, dword [esp + 0x78]
lea ecx, [ebp + 0x80]
lea eax, [ebp + 0x2e4]
sub esp, 4
lea edx, [esp + 0x54]
lea esi, [esp + 0x50]
push 0x164
push ecx
push dword [esp + 0x80]
push dword [esp + 0x80]
push edx
push esi
push ebp
push 0x100
push eax
call fcn.004029d0
add esp, 0x28
cmp eax, 0xffffff88
ja 0x403457
mov esi, dword [esp + 0x6c]
mov edx, dword [esi]
mov ebx, dword [esp + 0x50]
movzx ecx, dl
inc ecx
cmp ebx, ecx
ja 0x40345f
mov dword [esp + 0x2c], eax
mov ecx, edx
shr ecx, 0x18
mov byte [esi], dl
mov byte [esi + 1], 0
mov byte [esi + 2], bl
mov byte [esi + 3], cl
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x24], ebx
test ebx, ebx
js 0x402d70
mov ebx, dword [esp + 0x24]
lea edi, [ebx + 1]
mov ecx, edi
and ecx, 3
xor edx, edx
mov esi, 0
cmp ebx, 3
jb 0x402d4f
and edi, 0xfffffffc
xor edx, edx
xor esi, esi
nop word cs:[eax + eax]
mov ebx, dword [ebp + edx*4]
add ebx, esi
mov dword [ebp + edx*4 + 0x40], esi
mov esi, dword [ebp + edx*4 + 4]
add esi, ebx
mov dword [ebp + edx*4 + 0x44], ebx
mov ebx, dword [ebp + edx*4 + 8]
add ebx, esi
mov dword [ebp + edx*4 + 0x48], esi
mov esi, dword [ebp + edx*4 + 0xc]
add esi, ebx
mov dword [ebp + edx*4 + 0x4c], ebx
add edx, 4
cmp edi, edx
jne 0x402d20
test ecx, ecx
je 0x402d70
lea edx, [edx*4 + 0x40]
add edx, ebp
xor edi, edi
nop
mov ebx, dword [edx + edi*4 - 0x40]
add ebx, esi
mov dword [edx + edi*4], esi
inc edi
mov esi, ebx
cmp ecx, edi
jne 0x402d60
xor ecx, ecx
cmp eax, 4
jl 0x402dfd
lea edx, [eax - 3]
xor ecx, ecx
movzx esi, byte [ebp + ecx + 0x2e4]
mov edi, dword [ebp + esi*4 + 0x40]
lea ebx, [edi + 1]
mov dword [ebp + esi*4 + 0x40], ebx
mov byte [ebp + edi + 0x1e4], cl
movzx esi, byte [ebp + ecx + 0x2e5]
mov edi, dword [ebp + esi*4 + 0x40]
lea ebx, [edi + 1]
mov dword [ebp + esi*4 + 0x40], ebx
mov ebx, ecx
inc bl
mov byte [ebp + edi + 0x1e4], bl
movzx esi, byte [ebp + ecx + 0x2e6]
mov edi, dword [ebp + esi*4 + 0x40]
lea ebx, [edi + 1]
mov dword [ebp + esi*4 + 0x40], ebx
mov ebx, ecx
add bl, 2
mov byte [ebp + edi + 0x1e4], bl
movzx esi, byte [ebp + ecx + 0x2e7]
mov edi, dword [ebp + esi*4 + 0x40]
lea ebx, [edi + 1]
mov dword [ebp + esi*4 + 0x40], ebx
mov ebx, ecx
add bl, 3
mov byte [ebp + edi + 0x1e4], bl
add ecx, 4
cmp ecx, edx
jl 0x402d80
mov ebx, eax
sub ebx, ecx
jle 0x402e6f
lea edx, [ecx + 1]
test bl, 1
je 0x402e27
movzx esi, byte [ebp + ecx + 0x2e4]
mov edi, dword [ebp + esi*4 + 0x40]
lea ebx, [edi + 1]
mov dword [ebp + esi*4 + 0x40], ebx
mov byte [ebp + edi + 0x1e4], cl
mov ecx, edx
cmp eax, edx
je 0x402e6f
nop dword [eax + eax]
movzx edx, byte [ebp + ecx + 0x2e4]
mov esi, dword [ebp + edx*4 + 0x40]
lea edi, [esi + 1]
mov dword [ebp + edx*4 + 0x40], edi
mov byte [ebp + esi + 0x1e4], cl
movzx edx, byte [ebp + ecx + 0x2e5]
mov esi, dword [ebp + edx*4 + 0x40]
lea edi, [esi + 1]
mov dword [ebp + edx*4 + 0x40], edi
mov edx, ecx
inc dl
mov byte [ebp + esi + 0x1e4], dl
add ecx, 2
cmp ecx, eax
jne 0x402e30
mov eax, dword [esp + 0x24]
lea edx, [eax + 1]
cmp edx, 2
jb 0x40345b
mov eax, dword [ebp]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x6c]
lea ecx, [eax + 4]
mov dword [esp + 0x14], ecx
lea ecx, [ebp + 0x1e4]
mov dword [esp + 0x1c], ecx
lea ecx, [ebp + 0x1e5]
mov dword [esp + 0x18], ecx
lea ecx, [eax + 0xc]
mov dword [esp + 0x34], ecx
lea ecx, [eax + 0xb]
mov dword [esp + 0x38], ecx
pxor xmm0, xmm0
movdqa xmm1, xmmword [0x421070]
movdqa xmm2, xmmword [0x421080]
lea ecx, [eax + 7]
mov dword [esp + 0x30], ecx
add eax, 0x14
mov dword [esp + 0x3c], eax
mov dword [esp + 4], 0
mov ecx, 1
mov dword [esp + 0x40], edx
jmp 0x402f19
mov eax, dword [esp]
add dword [esp + 8], eax
imul ebp, eax
add dword [esp + 4], ebp
mov ecx, dword [esp + 0x48]
lea eax, [ecx + 1]
cmp ecx, dword [esp + 0x24]
mov ecx, eax
mov ebp, dword [esp + 0x78]
mov edx, dword [esp + 0x40]
je 0x40345b
mov edi, 1
shl edi, cl
mov esi, dword [ebp + ecx*4]
mov ebp, edi
sar ebp, 1
mov eax, edx
sub eax, ecx
lea edx, [ebp - 1]
cmp edx, 7
mov dword [esp], esi
mov dword [esp + 0x48], ecx
ja case.0x402f3f.3
jmp dword [edx*4 + 0x421100]
test esi, esi
jle 0x402ef0
xor edx, edx
mov ebx, dword [esp]
cmp ebx, 0x10
jae 0x4031f5
mov esi, dword [esp + 4]
jmp 0x40326e
test esi, esi
jle 0x402ef0
xor edx, edx
mov ecx, dword [esp + 4]
mov ebx, dword [esp]
cmp ebx, 1
je 0x402fe9
and ebx, 0xfffffffe
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x18]
lea esi, [edx + ecx]
mov edi, dword [esp + 4]
mov ecx, edi
neg ecx
mov edx, dword [esp + 0x38]
lea edi, [edx + edi*2]
xor edx, edx
nop dword [eax]
movzx ebx, byte [esi + edx - 1]
mov byte [edi + edx*4 - 7], bl
mov byte [edi + edx*4 - 6], al
mov byte [edi + edx*4 - 5], bl
mov byte [edi + edx*4 - 4], al
movzx ebx, byte [esi + edx]
mov byte [edi + edx*4 - 3], bl
mov byte [edi + edx*4 - 2], al
mov byte [edi + edx*4 - 1], bl
mov byte [edi + edx*4], al
add edx, 2
add ecx, 0xfffffffc
cmp dword [esp + 0xc], edx
jne 0x402fb0
neg ecx
mov ebx, dword [esp]
test bl, 1
je 0x402ef0
add edx, dword [esp + 8]
mov esi, dword [esp + 0x78]
movzx edx, byte [esi + edx + 0x1e4]
mov esi, dword [esp + 0x6c]
mov byte [esi + ecx*2 + 4], dl
mov byte [esi + ecx*2 + 5], al
mov byte [esi + ecx*2 + 6], dl
mov byte [esi + ecx*2 + 7], al
jmp 0x402ef0
test esi, esi
jle 0x402ef0
shl eax, 8
movzx eax, ax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 4]
lea esi, [eax + ecx*2]
lea edx, [ebp*2]
xor ecx, ecx
mov dword [esp + 0x10], edi
jmp 0x40305c
inc ecx
add esi, edx
cmp ecx, dword [esp]
je 0x402ef0
cmp edi, 2
jl 0x403050
mov eax, dword [esp + 8]
add eax, ecx
mov edi, edx
mov edx, dword [esp + 0x78]
movzx eax, byte [edx + eax + 0x1e4]
or eax, dword [esp + 0xc]
mov ebx, eax
mov edx, 0x10001
imul ebx, edx
mul edx
add edx, ebx
movd xmm3, edx
mov edx, edi
mov edi, dword [esp + 0x10]
movd xmm4, eax
punpckldq xmm4, xmm3
pshufd xmm3, xmm4, 0x44
xor eax, eax
movdqu xmmword [esi + eax*2 - 0x10], xmm3
movdqu xmmword [esi + eax*2], xmm3
add eax, 0x10
cmp eax, ebp
jl 0x4030a0
jmp 0x403050
test esi, esi
jle 0x402ef0
shl eax, 8
movzx eax, ax
mov dword [esp + 0x20], eax
mov edi, dword [esp]
cmp edi, 8
jae 0x4032e4
mov edi, dword [esp + 4]
xor esi, esi
jmp 0x403387
test esi, esi
jle 0x402ef0
shl eax, 8
movzx edi, ax
xor esi, esi
mov ebx, dword [esp + 4]
cmp dword [esp], 1
je 0x4031a9
mov eax, dword [esp]
and eax, 0xfffffffe
mov dword [esp + 0x28], eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x10], eax
xor esi, esi
mov ebx, dword [esp + 4]
mov dword [esp + 0xc], edi
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + esi - 1]
or eax, edi
mov edi, eax
mov edx, 0x10001
mul edx
mov ecx, 0x10001
imul edi, ecx
add edx, edi
movd xmm3, edx
movd xmm4, eax
punpckldq xmm4, xmm3
pshufd xmm3, xmm4, 0x44
mov eax, dword [esp + 0x6c]
movdqu xmmword [eax + ebx*2 + 4], xmm3
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + esi]
or eax, dword [esp + 0xc]
mov edi, eax
mul ecx
imul edi, ecx
add edx, edi
mov edi, dword [esp + 0xc]
movd xmm3, edx
mov ecx, dword [esp + 0x6c]
movd xmm4, eax
punpckldq xmm4, xmm3
pshufd xmm3, xmm4, 0x44
movdqu xmmword [ecx + ebx*2 + 0x14], xmm3
add ebx, 0x10
add esi, 2
cmp dword [esp + 0x28], esi
jne 0x403130
test byte [esp], 1
je 0x402ef0
add esi, dword [esp + 8]
mov eax, dword [esp + 0x78]
movzx eax, byte [eax + esi + 0x1e4]
or edi, eax
mov ecx, edi
mov edx, 0x10001
imul ecx, edx
mov eax, edi
mul edx
add edx, ecx
movd xmm3, edx
movd xmm4, eax
punpckldq xmm4, xmm3
pshufd xmm3, xmm4, 0x44
mov eax, dword [esp + 0x6c]
movdqu xmmword [eax + ebx*2 + 4], xmm3
jmp 0x402ef0
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 4]
lea ecx, [ecx + esi*2]
mov esi, dword [esp + 8]
mov edi, dword [esp + 0x1c]
add edi, esi
add esi, ebx
add esi, dword [esp + 0x1c]
cmp ecx, esi
jae 0x403230
mov ebx, dword [esp + 4]
mov dword [esp + 4], ebx
mov esi, dword [esp]
add esi, ebx
mov ebx, dword [esp + 0x14]
lea ebx, [ebx + esi*2]
mov esi, dword [esp + 4]
cmp edi, ebx
jb 0x40326e
mov edx, dword [esp]
and edx, 0xfffffff8
mov esi, dword [esp + 4]
add esi, edx
movzx ebx, al
movd xmm3, ebx
punpcklbw xmm3, xmm3
pshuflw xmm3, xmm3, 0
xor ebx, ebx
nop
movq xmm4, qword [edi + ebx]
punpcklbw xmm4, xmm3
movdqu xmmword [ecx + ebx*2], xmm4
add ebx, 8
cmp edx, ebx
jne 0x403250
cmp dword [esp], edx
je 0x402ef0
mov ecx, edx
or ecx, 1
mov ebx, dword [esp]
test bl, 1
je 0x40329a
add edx, dword [esp + 8]
mov edi, dword [esp + 0x78]
movzx edx, byte [edi + edx + 0x1e4]
mov edi, dword [esp + 0x6c]
mov byte [edi + esi*2 + 4], dl
mov byte [edi + esi*2 + 5], al
inc esi
mov edx, ecx
cmp ebx, ecx
je 0x402ef0
mov ecx, dword [esp]
sub ecx, edx
add edx, dword [esp + 8]
add edx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
lea esi, [edi + esi*2]
xor edi, edi
nop dword [eax + eax]
movzx ebx, byte [edx + edi - 1]
mov byte [esi + edi*2 - 3], bl
mov byte [esi + edi*2 - 2], al
movzx ebx, byte [edx + edi]
mov byte [esi + edi*2 - 1], bl
mov byte [esi + edi*2], al
add edi, 2
cmp ecx, edi
jne 0x4032c0
jmp 0x402ef0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 4]
lea eax, [eax + ecx*2]
mov edx, dword [esp + 8]
mov esi, dword [esp + 0x1c]
lea ecx, [esi + edx]
add edx, edi
add edx, esi
cmp eax, edx
mov esi, 0
jae 0x40331e
mov ebx, dword [esp + 4]
lea edx, [ebx + ebx]
mov edi, dword [esp]
lea edx, [edx + edi*8]
add edx, dword [esp + 0x14]
mov edi, ebx
cmp ecx, edx
jb 0x403387
mov edi, dword [esp]
mov esi, edi
and esi, 0xfffffffe
mov edx, dword [esp + 4]
lea edx, [edx + esi*4]
mov dword [esp + 0xc], edx
movd xmm3, dword [esp + 0x20]
mov ebx, esi
pshufd xmm3, xmm3, 0x50
xor edx, edx
movzx esi, word [ecx + edx]
movd xmm4, esi
punpcklbw xmm4, xmm0
punpcklwd xmm4, xmm0
por xmm4, xmm3
punpckldq xmm4, xmm0
movdqa xmm5, xmm4
pmuludq xmm5, xmm1
pmuludq xmm4, xmm2
psllq xmm4, 0x20
paddq xmm4, xmm5
movdqu xmmword [eax + edx*8], xmm4
add edx, 2
cmp ebx, edx
jne 0x403340
cmp edi, ebx
mov esi, ebx
mov edi, dword [esp + 0xc]
je 0x402ef0
mov ecx, esi
or ecx, 1
mov eax, dword [esp]
test al, 1
je 0x4033ce
add esi, dword [esp + 8]
mov eax, dword [esp + 0x78]
movzx eax, byte [eax + esi + 0x1e4]
or eax, dword [esp + 0x20]
mov esi, eax
mov edx, 0x10001
mul edx
mov ebx, 0x10001
imul esi, ebx
add edx, esi
mov esi, dword [esp + 0x6c]
mov dword [esi + edi*2 + 4], eax
mov eax, dword [esp]
mov dword [esi + edi*2 + 8], edx
add edi, 4
mov esi, ecx
cmp eax, ecx
mov ecx, dword [esp + 0x20]
je 0x402ef0
mov eax, dword [esp]
sub eax, esi
mov dword [esp + 0x10], eax
add esi, dword [esp + 8]
add esi, dword [esp + 0x18]
mov dword [esp + 0xc], esi
mov eax, dword [esp + 0x34]
lea eax, [eax + edi*2]
mov dword [esp + 0x28], eax
xor edi, edi
mov dword [esp + 0x44], ebp
mov ebx, dword [esp + 0xc]
movzx eax, byte [ebx + edi - 1]
or eax, ecx
mov esi, ecx
mov ecx, eax
mov edx, 0x10001
imul ecx, edx
mul edx
add edx, ecx
mov ebp, dword [esp + 0x28]
mov dword [ebp + edi*8 - 8], eax
mov dword [ebp + edi*8 - 4], edx
movzx eax, byte [ebx + edi]
or eax, esi
mov ecx, eax
mov ebx, 0x10001
mul ebx
imul ecx, ebx
add edx, ecx
mov ecx, esi
mov dword [ebp + edi*8], eax
mov dword [ebp + edi*8 + 4], edx
mov ebp, dword [esp + 0x44]
add edi, 2
cmp dword [esp + 0x10], edi
jne 0x403400
jmp 0x402ef0
mov edi, eax
jmp 0x40345f
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.0040d9a4
mov eax, edi
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret