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

Disassembly:
sub esp, 0x90
mov eax, dword [esp + 0x94]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebp
push esi
push edi
mov dword [esp + 0x14], ecx
push eax
call ebx
mov edi, eax
mov si, word [edi + 0xe]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
cmp si, 0x20
mov dword [esp + 0x18], ecx
mov dword [esp + 0x30], edx
jne 0x402bb3
mov eax, 4
mov dword [esp + 0x24], eax
jmp 0x402bc8
mov ax, si
sub ax, 0x18
neg ax
sbb eax, eax
and al, 0xfe
add eax, 3
mov dword [esp + 0x24], eax
xor ecx, ecx
cmp eax, 4
mov ebp, dword [esp + 0xa8]
sete cl
xor edx, edx
cmp eax, 1
mov eax, dword [esp + 0xac]
push ecx
mov ecx, dword [esp + 0x18]
sete dl
push edx
push 0
push eax
push ebp
call fcn.00402930
test eax, eax
mov dword [esp + 0x58], eax
jne 0x402c1a
mov ecx, dword [esp + 0xa4]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x90
ret 0xc
push eax
call ebx
mov edx, dword [esp + 0x18]
mov ecx, esi
and ecx, 0xffff
mov ebx, ecx
imul ecx, ebp
imul ebx, edx
add ebx, 0x1f
add ecx, 0x1f
sar ebx, 3
sar ecx, 3
and ebx, 0xfffffffc
and ecx, 0xfffffffc
cmp si, 0x20
mov dword [esp + 0x44], ecx
jne 0x402c51
xor esi, esi
jmp 0x402c60
sub si, 0x18
neg si
sbb esi, esi
and esi, 0x400
lea edi, [esi + edi + 0x28]
lea eax, [esi + eax + 0x28]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0xac]
cmp edx, ebp
mov dword [esp + 0x3c], eax
jne 0x402cc0
mov edx, dword [esp + 0x30]
cmp edx, edi
jne 0x402cc0
imul ecx, edx
mov esi, dword [esp + 0x10]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call esi
mov eax, dword [esp + 0xa4]
push eax
call esi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0xc
fild dword [esp + 0x18]
mov esi, dword [esp + 0x24]
imul esi, ebp
fidiv dword [esp + 0xa8]
shl esi, 1
push esi
fstp qword [esp + 0x9c]
fild dword [esp + 0x34]
fidiv dword [esp + 0xb0]
fstp qword [esp + 0x94]
call fcn.0045b4da
push esi
mov dword [esp + 0x50], eax
call fcn.0045b4da
lea ecx, [ebp + ebp]
mov dword [esp + 0x54], eax
push ecx
call fcn.0045b4da
lea edx, [ebp*4]
mov esi, eax
push edx
mov dword [esp + 0x70], esi
call fcn.0045b4da
fld qword [esp + 0xa8]
mov edx, dword [esp + 0x58]
xor ecx, ecx
fmul qword [0x46c888]
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x5c]
add esp, 0x10
cmp ebp, ecx
fsub qword [0x46c888]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], edx
jle 0x402de4
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], ebp
fld st(0)
fxch st(1)
fadd qword [esp + 0x98]
fxch st(1)
fcom qword [0x46c880]
fnstsw ax
test ah, 1
je 0x402d88
fstp st(0)
fld qword [0x46c880]
fld st(0)
call fcn.004441dc
mov dword [esp + 0x50], eax
mov ecx, dword [esp + 0x1c]
fild dword [esp + 0x50]
mov dword [ecx], eax
fadd qword [0x46c878]
fsub st(1)
fmul qword [0x46c870]
fadd qword [0x46c888]
call fcn.004441dc
mov ecx, dword [esp + 0x20]
fstp st(0)
mov word [ecx], ax
mov eax, dword [esp + 0x1c]
add eax, 4
add ecx, 2
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
dec eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], eax
jne 0x402d66
mov eax, dword [esp + 0x5c]
fstp st(0)
jmp 0x402de6
fstp st(0)
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x70], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x80], eax
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x64]
mov dword [esp + 0x88], ecx
mov ecx, dword [esp + 0x14]
push eax
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], edi
mov dword [esp + 0x80], esi
mov dword [esp + 0x88], ebx
mov dword [esp + 0x90], edx
call fcn.00402850
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
fld qword [esp + 0x90]
imul ebx, edi
fmul qword [0x46c888]
fsub qword [0x46c888]
fstp qword [esp + 0x50]
lea eax, [edi - 1]
add ebx, edx
cmp eax, 0xffffffff
jle 0x403020
inc eax
mov dword [esp + 0x1c], eax
fld qword [esp + 0x50]
fld qword [esp + 0x50]
fadd qword [esp + 0x90]
sub ebx, dword [esp + 0x44]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x20], ebx
fstp qword [esp + 0x50]
fcom qword [0x46c880]
fnstsw ax
test ah, 1
je 0x402eb0
fstp st(0)
fld qword [0x46c880]
fld st(0)
call fcn.004441dc
mov esi, eax
mov eax, dword [esp + 0x30]
cmp esi, eax
mov dword [esp + 0x10], esi
lea edi, [esi + 1]
jl 0x402ecf
lea esi, [eax - 1]
mov dword [esp + 0x10], esi
cmp edi, eax
jl 0x402ed6
lea edi, [eax - 1]
fild dword [esp + 0x10]
fadd qword [0x46c878]
fsub st(1)
fmul qword [0x46c870]
fadd qword [0x46c888]
call fcn.004441dc
mov ecx, 0x100
mov dword [esp + 0x28], eax
sub ecx, eax
mov eax, dword [esp + 0x2c]
cmp esi, eax
mov dword [esp + 0x10], ecx
fstp st(0)
je 0x402f5e
cmp esi, dword [esp + 0x38]
jne 0x402f3a
lea ecx, [esp + 0x40]
lea edx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
push edx
call fcn.00402830
lea eax, [esp + 0x38]
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, dword [esp + 0x1c]
call fcn.00402830
jmp 0x402f5e
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x64]
mov dword [esp + 0x2c], esi
push eax
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], edx
call fcn.00402850
cmp edi, esi
jne 0x402f74
mov dword [esp + 0x28], 0x100
mov dword [esp + 0x10], 0
jmp 0x402f9e
cmp edi, dword [esp + 0x38]
je 0x402f9e
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x64]
mov dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x14]
push edx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x8c], edi
call fcn.00402850
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x40]
test ebp, ebp
jle 0x40300d
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x403002
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
and ecx, 0xffff
and edx, 0xffff
mov ebp, eax
xor eax, eax
xor ebx, ebx
mov ax, word [esi]
mov bx, word [edi]
imul eax, ecx
imul ebx, edx
add eax, ebx
add esi, 2
mov ebx, eax
mov eax, dword [esp + 0x20]
sar ebx, 0x10
add edi, 2
mov byte [eax], bl
inc eax
dec ebp
mov dword [esp + 0x20], eax
jne 0x402fcc
mov ebp, dword [esp + 0xa8]
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x402fae
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x402e7c
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x48]
push eax
call fcn.0045b503
mov ecx, dword [esp + 0x50]
push ecx
call fcn.0045b503
push esi
call fcn.0045b503
mov edx, dword [esp + 0x68]
push edx
call fcn.0045b503
mov eax, dword [esp + 0xb4]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
add esp, 0x10
push eax
call esi
mov edi, dword [esp + 0x58]
push edi
call esi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0xc