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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x160
mov eax, dword [edx + 0x58]
movsd xmm0, qword [edx + 0x78]
mov edi, dword [edx + 0x118]
mov esi, edx
mov ebx, ecx
mov dword [esp + 8], eax
mov eax, dword [edx + 0x5c]
movsd qword [esp + 0x70], xmm0
movsd xmm0, qword [edx + 0x70]
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x80]
movsd qword [esp + 0x68], xmm0
movsd xmm0, qword [edx + 0x68]
mov dword [esp + 0x78], eax
mov eax, dword [edx + 0x60]
movsd qword [esp + 0x60], xmm0
movsd xmm0, qword [edx + 0x88]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x64]
movaps xmmword [esp + 0xa0], xmm0
movsd xmm0, qword [edx + 0x94]
mov dword [esp + 0x14], eax
mov eax, dword [edx + 0x84]
movaps xmmword [esp + 0xb0], xmm0
movsd xmm0, qword [edx + 0xa0]
mov dword [esp + 0x24], eax
mov eax, dword [edx + 0x90]
movaps xmmword [esp + 0xc0], xmm0
movsd xmm0, qword [edx + 0xac]
mov dword [esp + 0x28], eax
mov eax, dword [edx + 0x9c]
movaps xmmword [esp + 0xd0], xmm0
movsd xmm0, qword [edx + 0xb8]
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0xa8]
movaps xmmword [esp + 0xe0], xmm0
movsd xmm0, qword [edx + 0xc4]
mov dword [esp + 0x30], eax
mov eax, dword [edx + 0xb4]
movaps xmmword [esp + 0xf0], xmm0
movsd xmm0, qword [edx + 0xd0]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0xc0]
movaps xmmword [esp + 0x100], xmm0
movsd xmm0, qword [edx + 0xdc]
mov dword [esp + 0x38], eax
mov eax, dword [edx + 0xcc]
movaps xmmword [esp + 0x120], xmm0
movsd xmm0, qword [edx + 0xe8]
mov dword [esp + 0x3c], eax
mov eax, dword [edx + 0xd8]
movaps xmmword [esp + 0x110], xmm0
movsd xmm0, qword [edx + 0xf4]
mov dword [esp + 0x40], eax
mov eax, dword [edx + 0xe4]
movaps xmmword [esp + 0x130], xmm0
movsd xmm0, qword [edx + 0x10c]
mov dword [esp + 0x44], eax
mov eax, dword [edx + 0xf0]
movaps xmmword [esp + 0x140], xmm0
movsd xmm0, qword [edx + 0x124]
mov dword [esp + 0x48], eax
mov eax, dword [edx + 0xfc]
movaps xmmword [esp + 0x80], xmm0
movsd xmm0, qword [edx + 0x130]
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0x100]
movaps xmmword [esp + 0x90], xmm0
mov dword [esp + 0x54], eax
mov eax, dword [edx + 0x104]
mov dword [esp + 0x50], eax
mov eax, dword [edx + 0x108]
mov dword [esp + 0x4c], eax
mov eax, dword [edx + 0x114]
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x120]
mov dword [esp + 0x1c], eax
mov eax, dword [edx + 0x12c]
mov dword [esp + 0x20], eax
mov eax, dword [edx + 0x138]
mov dword [esp + 0x5c], eax
mov eax, dword [edx + 0x13c]
mov dword [esp + 0x58], eax
movzx eax, byte [0x5c6170]
mov eax, dword [0x5c6108]
test eax, eax
jne 0x4018a0
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x401ac4
mov dword [0x5c6108], eax
push 8
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x401ac4
mov edx, eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
test edi, edi
mov dword [edx], ecx
mov dword [edx + 4], eax
je 0x4018d8
push dword [esp + 0x10]
push 0
push dword [0x5c6108]
mov edi, edx
call sub.KERNEL32.dll_HeapFree
mov edx, edi
mov ecx, 0x16
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsd xmm0, qword [esp + 0x70]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 4]
movsd qword [ebx + 0x78], xmm0
movsd xmm0, qword [esp + 0x68]
mov dword [ebx + 0x80], eax
mov eax, dword [esp + 8]
movsd qword [ebx + 0x70], xmm0
movsd xmm0, qword [esp + 0x60]
movsd qword [ebx + 0x68], xmm0
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x5c], ecx
mov dword [ebx + 0x60], esi
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
movaps xmm0, xmmword [esp + 0xa0]
mov dword [ebx + 0x64], ecx
mov dword [ebx + 0x84], esi
movlps qword [ebx + 0x88], xmm0
mov ecx, dword [esp + 0x28]
movaps xmm0, xmmword [esp + 0xb0]
mov esi, dword [esp + 0x2c]
mov dword [ebx + 0x90], ecx
movlps qword [ebx + 0x94], xmm0
movaps xmm0, xmmword [esp + 0xc0]
mov dword [ebx + 0x9c], esi
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
movlps qword [ebx + 0xa0], xmm0
movaps xmm0, xmmword [esp + 0xd0]
mov dword [ebx + 0xa8], ecx
mov ecx, dword [esp + 0x38]
movlps qword [ebx + 0xac], xmm0
movaps xmm0, xmmword [esp + 0xe0]
mov dword [ebx + 0xb4], esi
mov esi, dword [esp + 0x3c]
movlps qword [ebx + 0xb8], xmm0
movaps xmm0, xmmword [esp + 0xf0]
mov dword [ebx + 0xc0], ecx
mov ecx, dword [esp + 0x40]
movlps qword [ebx + 0xc4], xmm0
movaps xmm0, xmmword [esp + 0x100]
mov dword [ebx + 0xcc], esi
mov esi, dword [esp + 0x44]
movlps qword [ebx + 0xd0], xmm0
movaps xmm0, xmmword [esp + 0x120]
mov dword [ebx + 0xd8], ecx
mov ecx, dword [esp + 0x48]
movlps qword [ebx + 0xdc], xmm0
movaps xmm0, xmmword [esp + 0x110]
mov dword [ebx + 0xe4], esi
mov esi, dword [esp + 0xc]
movlps qword [ebx + 0xe8], xmm0
mov dword [ebx + 0xf0], ecx
movaps xmm0, xmmword [esp + 0x130]
mov ecx, dword [esp + 0x54]
movlps qword [ebx + 0xf4], xmm0
mov dword [ebx + 0xfc], esi
mov dword [ebx + 0x100], ecx
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
movaps xmm0, xmmword [esp + 0x140]
mov dword [ebx + 0x104], esi
mov dword [ebx + 0x108], ecx
movlps qword [ebx + 0x10c], xmm0
mov dword [ebx + 0x114], edx
mov edx, dword [esp + 0x1c]
movaps xmm0, xmmword [esp + 0x80]
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0x118], 1
mov dword [ebx + 0x11c], 1
mov dword [ebx + 0x120], edx
mov edx, dword [esp + 0x5c]
movlps qword [ebx + 0x124], xmm0
mov dword [ebx + 0x12c], ecx
movaps xmm0, xmmword [esp + 0x90]
mov ecx, dword [esp + 0x58]
or edx, 0x20
movlps qword [ebx + 0x130], xmm0
mov dword [ebx + 0x138], edx
mov dword [ebx + 0x13c], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, 4
mov edx, 8
call dbg.handle_alloc_error
ud2