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

Disassembly:
push ebp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x4c
cmp edx, 0x20
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
ja 0x491eeb
xor ebp, ebp
test edx, edx
mov ebx, dword [ecx + 0xa0]
je 0x491ed9
lea edx, [ebx + 0xdac]
lea edi, [esp + 0x2c]
mov dword [esp + 0x20], edx
jmp 0x491e1c
mov eax, dword [ebx + 0xda4]
cmp eax, dword [ebx + 0xda8]
jge 0x491e6a
mov ecx, eax
sar ecx, 0x1f
shr ecx, 0x1d
lea eax, [ecx + eax]
mov edx, eax
and eax, 7
sar edx, 3
sub ecx, eax
movzx edx, byte [ebx + edx + 0xdac]
add ecx, 7
sar edx, cl
and edx, 1
mov byte [ebp + edi], dl
mov eax, dword [ebx + 0xda4]
add eax, 1
cmp eax, 0x2000
mov dword [ebx + 0xda4], eax
je 0x491ec0
add ebp, 1
cmp esi, ebp
je 0x491e6a
mov eax, dword [ebx + 0xda0]
test eax, eax
jne 0x491dc0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.004c54c0
mov dword [ebx + 0xda0], 1
shl eax, 3
mov dword [ebx + 0xda8], eax
mov eax, dword [ebx + 0xda4]
cmp eax, dword [ebx + 0xda8]
jl 0x491dd2
cmp esi, ebp
jbe 0x491e82
lea edi, [esp + 0x2c]
lea eax, [edi + ebp]
lea edx, [esi + edi]
mov byte [eax], 0
add eax, 1
cmp eax, edx
jne 0x491e78
test esi, esi
je 0x491ed9
lea ecx, [esi - 1]
mov ebx, 1
shl ebx, cl
xor edx, edx
xor ecx, ecx
lea edi, [esp + 0x2c]
movsx eax, byte [edx + edi]
add edx, 1
imul eax, ebx
shr ebx, 1
add ecx, eax
cmp edx, esi
jne 0x491e98
mov edx, dword [esp + 0x28]
mov eax, ecx
mov dword [edx], eax
add esp, 0x4c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 0xda4], 0
mov dword [ebx + 0xda0], 0
jmp 0x491e15
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [edx], eax
add esp, 0x4c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], 0x20
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0xb08840
mov dword [esp + 4], 1
mov dword [esp], 0xc
call fcn.00405fb0
mov dword [esp], 1
call sub.msvcrt.dll_exit
nop
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x6c], 0
mov eax, dword [eax + 0xa0]
test ecx, ecx
mov dword [ebp - 0x68], eax
jle 0x4926ab
lea edx, [eax + 0x18]
lea ecx, [eax + 0x1c]
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x7c], ecx
mov edx, dword [ebp - 0x68]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x70], esp
mov eax, dword [edx + 0xd9c]
shl eax, 2
imul eax, dword [ecx + 0x24]
add eax, 0x1e
and eax, 0xfffffff0
call fcn.00aa20e0
lea eax, [esp + 0x1f]
and eax, 0xfffffff0
mov dword [ebp - 0x74], eax
call dword [0xdff640]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [edx + 0xa0]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x64], edx
mov edx, dword [edx + 0x74]
call fcn.00491d80
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x7c]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x68]
mov eax, dword [edx + 0x18]
mov dword [esp], eax
call dword [0xdff5f0]
test eax, eax
jne 0x492682
mov eax, dword [ebp - 0x68]
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x64]
mov eax, dword [eax + 0x1c]
mov edx, dword [edx + eax*4 + 0xd8c]
cmp eax, 2
mov ecx, dword [ecx + eax*4 + 0xd7c]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], ecx
je 0x492655
imul eax, dword [ebp - 0x58], 0x3c
add eax, dword [ebp - 0x64]
mov dword [ebp - 0x14], 0
mov edx, dword [eax + 0xa8]
test edx, edx
jle 0x492059
xor esi, esi
mov edi, eax
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x68]
mov edx, dword [eax + esi*4]
lea eax, [esi*4]
add eax, dword [ecx + 0x38]
mov ecx, dword [ebp + 8]
call fcn.00491d80
mov ecx, dword [ebp - 0x68]
mov ebx, eax
mov eax, dword [ebp - 0x50]
mov edx, dword [eax + esi*4]
mov eax, esi
add esi, 1
add eax, dword [edi + 0xa8]
shl eax, 2
add eax, dword [ecx + 0x38]
mov ecx, dword [ebp + 8]
call fcn.00491d80
add eax, ebx
add dword [ebp - 0x14], eax
cmp dword [edi + 0xa8], esi
jg 0x49200d
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x64]
add eax, dword [ebp - 0x54]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 0x70]
test eax, eax
jle 0x49267b
imul eax, dword [ebp - 0x58], 0x3c
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x48], 0
lea esi, [eax + edx]
mov eax, dword [esi + 0xa4]
xor edi, edi
test eax, eax
jle 0x4920e5
mov edx, dword [esi + 0xb0]
xor ebx, ebx
test edx, edx
jle 0x4920da
lea esi, [esi]
mov eax, dword [ebp - 0x48]
imul eax, dword [esi + 0xa4]
mov ecx, dword [ebp - 0x68]
lea eax, [edi + eax]
imul edx, eax
lea eax, [edx + ebx]
mov edx, dword [esi + 0xb4]
add ebx, 1
shl eax, 2
add eax, dword [ecx + 0x3c]
mov ecx, dword [ebp + 8]
call fcn.00491d80
mov edx, dword [esi + 0xb0]
add dword [ebp - 0x1c], eax
cmp edx, ebx
jg 0x4920a0
add edi, 1
cmp dword [esi + 0xa4], edi
jg 0x492091
mov edx, dword [ebp - 0x64]
add dword [ebp - 0x48], 1
mov eax, dword [edx + 0x70]
cmp eax, dword [ebp - 0x48]
mov edx, eax
jg 0x492085
test eax, eax
jle 0x4926b6
imul eax, dword [ebp - 0x58], 0x3c
xor esi, esi
mov ecx, dword [ebp - 0x64]
lea edi, [eax + ecx]
mov eax, dword [edi + 0xa4]
xor ebx, ebx
test eax, eax
jle 0x49214b
mov ecx, dword [ebp - 0x64]
imul eax, esi
mov edx, dword [ecx + 0x88]
add eax, ebx
add ebx, 1
mov ecx, dword [ebp - 0x68]
shl eax, 2
add eax, dword [ecx + 0x40]
mov ecx, dword [ebp + 8]
call fcn.00491d80
add dword [ebp - 0x1c], eax
mov eax, dword [edi + 0xa4]
cmp eax, ebx
jg 0x492116
mov eax, dword [ebp - 0x64]
mov edx, dword [eax + 0x70]
add esi, 1
cmp edx, esi
jg 0x49210a
mov ecx, dword [ebp - 0x1c]
add dword [ebp - 0x18], ecx
test edx, edx
jle 0x49267b
imul eax, dword [ebp - 0x58], 0x3c
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
lea edi, [eax + edx]
mov eax, dword [edi + 0xb8]
mov ecx, dword [ebp - 0x64]
add eax, 1
imul eax, dword [ebp - 0x40]
mov edx, dword [ecx + 0x8c]
mov ecx, dword [ebp - 0x68]
lea ebx, [eax*4]
mov eax, ebx
add eax, dword [ecx + 0x44]
mov ecx, dword [ebp + 8]
call fcn.00491d80
add dword [ebp - 0x44], eax
mov eax, dword [edi + 0xb8]
test eax, eax
jle 0x4921e1
xor esi, esi
mov eax, dword [ebp - 0x64]
add esi, 1
mov ecx, dword [ebp - 0x68]
mov edx, dword [eax + 0x90]
mov eax, dword [ecx + 0x44]
mov ecx, dword [ebp + 8]
add eax, 4
add eax, ebx
add ebx, 4
call fcn.00491d80
add dword [ebp - 0x44], eax
cmp dword [edi + 0xb8], esi
jg 0x4921b4
mov edx, dword [ebp - 0x64]
add dword [ebp - 0x40], 1
mov eax, dword [edx + 0x70]
cmp eax, dword [ebp - 0x40]
jg 0x492178
mov ecx, dword [ebp - 0x44]
add dword [ebp - 0x18], ecx
test eax, eax
jle 0x49267b
xor edi, edi
xor esi, esi
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x68]
mov edx, dword [eax + 0x78]
mov eax, dword [ecx + edi*4 + 0x48]
mov ecx, dword [ebp + 8]
call fcn.00491d80
mov ecx, dword [ebp - 0x68]
mov ebx, eax
mov eax, dword [ebp - 0x64]
mov edx, dword [eax + 0x7c]
mov eax, dword [ecx + edi*4 + 0x48]
mov ecx, dword [ebp + 8]
add eax, 4
call fcn.00491d80
add eax, ebx
add esi, eax
mov eax, dword [ebp - 0x64]
mov eax, dword [eax + 0x84]
test eax, eax
jle 0x492272
xor ebx, ebx
mov ecx, dword [ebp - 0x64]
mov edx, dword [ecx + 0x80]
mov ecx, dword [ebp - 0x68]
mov eax, dword [ecx + edi*4 + 0x48]
mov ecx, dword [ebp + 8]
add eax, 8
lea eax, [eax + ebx*4]
add ebx, 1
call fcn.00491d80
add esi, eax
mov eax, dword [ebp - 0x64]
cmp dword [eax + 0x84], ebx
jg 0x492244
mov edx, dword [ebp - 0x64]
add edi, 1
cmp dword [edx + 0x70], edi
jg 0x492202
imul eax, dword [ebp - 0x58], 0x3c
mov ecx, dword [ebp - 0x64]
add esi, dword [ebp - 0x18]
mov eax, dword [ecx + eax + 0xbc]
mov dword [ebp - 0x5c], esi
test eax, eax
je 0x492373
mov eax, dword [ebp + 8]
mov edi, dword [ecx + 0x94]
mov dword [ebp - 0x38], 0
mov eax, dword [eax + 0xa0]
test edi, edi
mov dword [ebp - 0x3c], eax
jle 0x492318
xor edi, edi
mov edx, dword [ebp - 0x3c]
lea ebx, [edi*4]
mov ecx, dword [ebp - 0x68]
mov eax, dword [edx + 0xd88]
mov edx, dword [eax + ebx]
mov eax, ebx
add eax, dword [ecx + 0x58]
mov ecx, dword [ebp + 8]
call fcn.00491d80
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x64]
mov esi, eax
mov eax, dword [edx + 0xd98]
mov edx, dword [eax + ebx]
mov eax, edi
add edi, 1
add eax, dword [ecx + 0x94]
mov ecx, dword [ebp - 0x68]
shl eax, 2
add eax, dword [ecx + 0x58]
mov ecx, dword [ebp + 8]
call fcn.00491d80
add eax, esi
add dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x64]
cmp dword [eax + 0x94], edi
jg 0x4922b8
mov edx, dword [ebp - 0x64]
mov esi, dword [edx + 0x70]
test esi, esi
jle 0x49236d
xor edi, edi
mov ecx, dword [ebp - 0x64]
lea ebx, [edi*4]
add edi, 1
mov edx, dword [ecx + 0x98]
mov ecx, dword [ebp - 0x68]
lea eax, [ecx + ebx + 0x50]
mov ecx, dword [ebp + 8]
call fcn.00491d80
mov ecx, dword [ebp - 0x68]
mov esi, eax
mov eax, dword [ebp - 0x64]
mov edx, dword [eax + 0x9c]
lea eax, [ecx + ebx + 0x5c]
mov ecx, dword [ebp + 8]
call fcn.00491d80
add eax, esi
add dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x64]
cmp dword [eax + 0x70], edi
jg 0x492324
mov edx, dword [ebp - 0x38]
add dword [ebp - 0x5c], edx
imul eax, dword [ebp - 0x58], 0x3c
add eax, dword [ebp - 0x64]
mov ebx, dword [eax + 0xc0]
test ebx, ebx
je 0x492435
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x34], 0
mov ecx, dword [ecx + 0x70]
test ecx, ecx
jle 0x49242f
mov dword [ebp - 0x2c], 0
mov edi, eax
mov edx, dword [edi + 0xa4]
test edx, edx
jle 0x49241c
mov eax, dword [edi + 0xac]
mov esi, dword [edi + 0xc4]
mov dword [ebp - 0x30], 0
cmp esi, eax
jge 0x4923ff
sub eax, esi
imul eax, dword [ebp - 0x30]
lea ebx, [eax*4]
mov edx, dword [ebp - 0x2c]
mov eax, ebx
add esi, 1
mov ecx, dword [ebp - 0x68]
add ebx, 4
add eax, dword [ecx + edx*4 + 0x64]
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0xc8]
call fcn.00491d80
add dword [ebp - 0x34], eax
cmp dword [edi + 0xac], esi
jg 0x4923d4
add dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
cmp dword [edi + 0xa4], eax
jle 0x49241c
mov eax, dword [edi + 0xac]
mov esi, dword [edi + 0xc4]
jmp 0x4923c3
mov ecx, dword [ebp - 0x64]
add dword [ebp - 0x2c], 1
mov edx, dword [ebp - 0x2c]
cmp dword [ecx + 0x70], edx
jg 0x4923a6
mov eax, dword [ebp - 0x34]
add dword [ebp - 0x5c], eax
mov edx, dword [ebp - 0x60]
cmp dword [ebp - 0x5c], edx
jne 0x4926a8
mov eax, dword [ebp - 0x5c]
sar eax, 0x1f
shr eax, 0x1d
add eax, dword [ebp - 0x5c]
sar eax, 3
test eax, eax
je 0x4926a8
mov ecx, dword [ebp - 0x74]
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call dword [0xdff5e0]
mov edx, dword [ebp - 0x68]
mov eax, dword [edx + 0x11ac]
test eax, eax
jne 0x492558
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], 9
je 0x492594
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x68]
mov ecx, dword [ecx + 0x24]
mov ebx, dword [eax + 0xd9c]
test ecx, ecx
mov dword [ebp - 0x80], ecx
je 0x49252a
mov esi, dword [ebp - 0x80]
lea edx, [ebx*4]
xor edi, edi
mov ecx, dword [ebp - 0x74]
mov dword [ebp - 0x24], edx
shl esi, 2
test ebx, ebx
je 0x49251f
mov eax, dword [ebp + 0xc]
xor edx, edx
lea eax, [eax + edi*4]
mov dword [ebp - 0x84], eax
jmp 0x4924fe
fld st(0)
fcomp dword [0xb08b20]
fnstsw ax
sahf
jbe 0x4924e1
fstp st(0)
fld dword [0xb08b20]
fld qword [0xb08b30]
add edx, 1
fmulp st(1)
mov eax, dword [ebp - 0x84]
add dword [ebp - 0x84], esi
cmp edx, ebx
fstp dword [eax]
je 0x49251f
fld dword [ecx + edx*4]
ftst
fnstsw ax
sahf
jae 0x4924cc
fld st(0)
fcomp dword [0xb08b28]
fnstsw ax
sahf
jae 0x4924e1
fstp st(0)
fld dword [0xb08b28]
jmp 0x4924e1
add edi, 1
add ecx, dword [ebp - 0x24]
cmp dword [ebp - 0x80], edi
jne 0x4924b8
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x80]
imul eax, dword [edx + 0x20]
imul eax, dword [ecx + 0xd9c]
add dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x6c]
cmp dword [ebp + 0x10], edx
mov esp, dword [ebp - 0x70]
jle 0x4926ab
add dword [ebp + 0xc], eax
jmp 0x491f56
mov ecx, dword [ebp + 8]
sub eax, 1
mov dword [edx + 0x11ac], eax
mov eax, dword [ecx + 0x24]
imul eax, dword [ecx + 0x20]
imul eax, dword [edx + 0xd9c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x24]
mov dword [ebp - 0x80], edx
jmp 0x49252a
mov eax, dword [ecx + 0x24]
mov edx, dword [ebp - 0x68]
test eax, eax
mov dword [ebp - 0x80], eax
mov esi, dword [edx + 0xd9c]
je 0x49252a
mov ebx, dword [ebp - 0x74]
lea ecx, [esi*4]
mov edi, eax
mov dword [ebp - 0x20], ecx
add edi, edi
mov dword [ebp - 0x28], 0
test esi, esi
je 0x49263d
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0xc]
fnstcw word [ebp - 0xe]
lea edx, [ecx + eax*2]
movzx eax, word [ebp - 0xe]
xor ecx, ecx
mov ah, 0xc
mov word [ebp - 0x10], ax
jmp 0x492609
fld st(0)
fcomp dword [0xb08b20]
fnstsw ax
sahf
jbe 0x4925f2
fstp st(0)
fld dword [0xb08b20]
add ecx, 1
fadd dword [0xb08b24]
fldcw word [ebp - 0x10]
fistp word [edx]
fldcw word [ebp - 0xe]
add edx, edi
cmp ecx, esi
je 0x49263d
fld dword [ebx + ecx*4]
ftst
fnstsw ax
sahf
jae 0x4925dd
fcom dword [0xb08b28]
fnstsw ax
sahf
jae 0x492626
fstp st(0)
fld dword [0xb08b28]
fsub dword [0xb08b24]
add ecx, 1
fldcw word [ebp - 0x10]
fistp word [edx]
fldcw word [ebp - 0xe]
add edx, edi
cmp ecx, esi
jne 0x492609
add dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x28]
add ebx, dword [ebp - 0x20]
cmp dword [ebp - 0x80], edx
jne 0x4925bf
jmp 0x49252a
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x64]
mov dword [esp], 0
add eax, 0x120
mov dword [esp + 4], eax
call dword [0xdff600]
jmp 0x491ff1
xor esi, esi
jmp 0x49227d
mov ecx, dword [ebp - 0x68]
mov eax, dword [ecx + 0x18]
mov dword [esp + 8], 0xb0885c
mov dword [esp + 4], 1
mov dword [esp], 0xc
mov dword [esp + 0xc], eax
call fcn.00405fb0
mov esp, dword [ebp - 0x70]
mov eax, dword [ebp - 0x6c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x1c]
add dword [ebp - 0x18], ecx
mov dword [ebp - 0x44], 0
jmp 0x4921f0