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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b3be4
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x5fa040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x54], ebx
cmp dword [ebx + 0x10], 0x8000000
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], eax
jae 0x512d97
lea ecx, [ebx + 0xc]
call fcn.00439780
push 0x70
call fcn.00587dd8
mov edi, eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x48], edi
add esp, 4
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x60], 0
mov dword [edi + 0x64], 0
mov dword [edi + 0x68], 0
mov ecx, dword [ebx + 0x10]
lea eax, [ecx + 1]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0xc]
mov dword [eax + ecx*4], edi
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x58]
mov esi, dword [edx]
and esi, 0x3fffffff
mov dword [ebp - 0x38], esi
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x3c], eax
cmp esi, dword [eax + 0x18]
jne 0x512d97
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
test esi, esi
je 0x51256d
push esi
call fcn.0058813f
mov edx, dword [ebp - 0x50]
add esp, 4
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], esi
mov dword [ebp - 4], 0
push dword [ebp - 0x74]
mov ecx, dword [edx]
movzx eax, word [edx + 8]
and ecx, 0x3fffffff
push ecx
push dword [edx + 4]
mov ecx, ebx
push eax
push dword [ebp - 0x58]
call fcn.005121c0
mov esi, eax
test esi, esi
jne 0x512d88
push dword [ebp - 0x38]
lea ecx, [ebp - 0x34]
push dword [ebp - 0x74]
call fcn.00512030
mov esi, eax
test esi, esi
jne 0x512d88
mov eax, dword [ebp - 0x34]
mov esi, 0x10a
cmp ax, si
mov edx, 0x28
sete cl
mov byte [ebp - 0x3d], cl
mov byte [edi + 0x48], cl
xor ecx, ecx
cmp ax, si
cmove ecx, edx
mov dword [ebp - 0x30], ecx
add ecx, 0xb0
cmp dword [ebp - 0x38], ecx
jb 0x512612
mov ecx, 0x105
cmp ax, cx
je 0x5125f2
cmp ax, si
jne 0x512612
cmp dword [ebp + 0xc], 0
mov edx, dword [ebp - 0x74]
mov cl, byte [edx + 0x1b]
mov byte [edi], cl
mov ax, word [edx + 0x22]
mov word [edi + 2], ax
jge 0x512629
cmp cl, 0xfa
je 0x512633
cmp cl, 0xfb
je 0x512633
push dword [ebp - 0x74]
mov esi, 1
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
cmp cl, 4
je 0x512633
cmp cl, 5
jne 0x512612
mov esi, edx
mov dword [ebp - 0x44], esi
mov ax, word [esi + 0x30]
mov word [edi + 4], ax
mov ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0x38]
mov dword [edi + 0xc], ecx
mov cl, byte [ebp - 0x3d]
mov dword [edi + 8], eax
test cl, cl
je 0x512656
lea edx, [esi + 8]
mov eax, dword [edx + 0x40]
mov esi, dword [edx + 0x44]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], esi
movq xmm0, qword [edx + 0x48]
movq qword [edi + 0x18], xmm0
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 0x50]
mov dword [edi + 0x20], eax
movq xmm0, qword [edx + 0x54]
movq qword [edi + 0x24], xmm0
mov eax, dword [edx + 0x5c]
mov dword [edi + 0x2c], eax
test cl, cl
je 0x51269c
movq xmm0, qword [edx + 0x60]
movq qword [edi + 0x3c], xmm0
mov eax, dword [edx + 0x68]
add edx, 0xc
mov dword [edi + 0x44], eax
movq xmm0, qword [edx + 0x60]
mov eax, esi
movq qword [edi + 0x30], xmm0
mov ecx, dword [edx + 0x68]
mov dword [edi + 0x38], ecx
mov ecx, dword [ebp - 0x3c]
mul dword [ecx + 0x18]
mov esi, eax
mov eax, dword [ebp - 0x34]
mul dword [ecx + 0x18]
mov ecx, dword [ebp - 0x44]
add esi, edx
mov edx, dword [ebp - 0x38]
add eax, edx
adc esi, 0
add dword [ebx + 0x60], eax
adc dword [ebx + 0x64], esi
mov esi, dword [ebp - 0x30]
mov eax, dword [esi + ecx + 0xa8]
mov ecx, dword [esi + ecx + 0xac]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], ecx
test al, 3
jne 0x512612
mov ebx, dword [ebp - 0x54]
add esi, 0xb0
mov eax, edx
sub eax, esi
cmp dword [ebp - 0x38], eax
ja 0x512612
add esi, dword [ebp - 0x38]
movzx eax, word [edi + 2]
sub edx, esi
and eax, 3
mov dword [ebp - 0x7c], eax
cmp ecx, edx
ja 0x512612
cmp eax, 3
jne 0x5127b4
mov byte [edi + 0x49], 1
cmp ecx, dword [edi + 0x50]
je 0x512766
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x512747
push eax
call fcn.00588148
mov ecx, dword [ebp - 0x3c]
add esp, 4
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
test ecx, ecx
je 0x51277c
push ecx
call fcn.0058813f
mov ecx, dword [ebp - 0x3c]
add esp, 4
mov dword [edi + 0x4c], eax
mov dword [edi + 0x50], ecx
jmp 0x51276a
test ecx, ecx
je 0x51277c
mov eax, dword [ebp - 0x74]
push ecx
add eax, esi
push eax
push dword [edi + 0x4c]
call fcn.0058aed0
add esp, 0xc
mov cl, byte [edi]
cmp cl, 4
sete al
cmp byte [ebp + 0x14], al
jne 0x512612
cmp cl, 4
jne 0x512d3d
cmp dword [ebp + 0xc], 0
jl 0x512612
cmp byte [edi + 0x49], 0
je 0x5128ef
mov esi, dword [edi + 0x50]
xor edx, edx
jmp 0x512927
mov byte [edi + 0x49], 0
test eax, eax
je 0x5127c5
cmp eax, 1
jne 0x512612
xor eax, eax
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x51277c
add esi, dword [ebp - 0x74]
mov edx, 0x10
mov eax, 8
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x7c], 0
jne 0x512814
cmp eax, ecx
ja 0x512612
mov eax, dword [esi + 4]
add edx, 8
mov ecx, dword [esi]
add dword [ebp - 0x44], 8
add dword [ebp - 0x30], 8
add esi, 8
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x38], edx
movzx eax, word [eax + 8]
jmp 0x51283c
cmp edx, ecx
ja 0x512612
mov eax, dword [esi + 4]
movzx ecx, word [esi + 8]
mov edx, dword [esi]
add dword [ebp - 0x44], 0x10
add dword [ebp - 0x30], 0x10
add dword [ebp - 0x38], 0x10
add esi, 0x10
mov dword [ebp - 0x6c], eax
mov eax, ecx
mov dword [ebp - 0x68], edx
mov ecx, dword [edi + 0x5c]
mov dword [ebp - 0x34], eax
cmp dword [edi + 0x58], ecx
jne 0x5128b8
cmp ecx, 0x7fffffff
jae 0x512dba
mov eax, ecx
mov edx, SysReAllocString
shr eax, 2
sub edx, ecx
inc eax
cmp eax, edx
cmovbe edx, eax
add edx, ecx
mov ecx, 0xc
mov eax, edx
mov dword [ebp - 0x48], edx
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0058813f
mov ecx, dword [edi + 0x58]
add esp, 4
mov dword [ebp - 0x78], eax
test ecx, ecx
je 0x5128a1
lea ecx, [ecx + ecx*2]
shl ecx, 2
push ecx
push dword [edi + 0x54]
push eax
call fcn.0058aed0
add esp, 0xc
push dword [edi + 0x54]
call fcn.00588148
mov eax, dword [ebp - 0x78]
add esp, 4
mov dword [edi + 0x54], eax
mov eax, dword [ebp - 0x48]
mov dword [edi + 0x5c], eax
mov ecx, dword [edi + 0x58]
movq xmm0, qword [ebp - 0x6c]
mov edx, dword [ebp - 0x34]
lea eax, [ecx + 1]
mov dword [edi + 0x58], eax
lea ecx, [ecx + ecx*2]
mov eax, dword [edi + 0x54]
movq qword [eax + ecx*4], xmm0
mov dword [eax + ecx*4 + 8], edx
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x44], ecx
jae 0x51277c
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x30]
jmp 0x5127e1
cmp dword [edi + 0x58], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x4c], xmm0
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x4c]
jbe 0x512927
mov ecx, dword [edi + 0x54]
mov ebx, dword [edi + 0x58]
add ecx, 4
nop dword [eax]
mov eax, dword [ecx]
lea ecx, [ecx + 0xc]
and eax, 0x3fffffff
add esi, eax
adc edx, 0
sub ebx, 1
jne 0x512910
mov ebx, dword [ebp - 0x54]
mov eax, dword [edi + 8]
mov dword [ebp - 0x48], eax
cmp esi, eax
jne 0x512612
cmp edx, dword [edi + 0xc]
jne 0x512612
push edi
push dword [ebp - 0x58]
mov ecx, ebx
call fcn.00512120
test al, al
je 0x512612
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x5c], ebx
mov byte [ebp - 4], 1
cmp dword [edi + 0xc], ebx
ja 0x512d1e
mov esi, dword [ebp - 0x48]
cmp esi, 0x40000000
jae 0x512d1e
cmp byte [edi + 0x49], bl
je 0x5129a2
lea eax, [edi + 0x4c]
lea ecx, [ebp - 0x60]
cmp eax, ecx
je 0x512a23
push dword [eax + 4]
push dword [eax]
call fcn.00439460
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x30], ebx
jmp 0x512a23
test esi, esi
je 0x5129c1
push esi
mov dword [ebp - 0x5c], 0
call fcn.0058813f
mov ebx, esi
mov dword [ebp - 0x60], eax
add esp, 4
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x5c], ebx
xor esi, esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x3c], esi
cmp dword [edi + 0x58], esi
jbe 0x512a23
xor edx, edx
mov dword [ebp - 0x50], edx
mov ecx, dword [edi + 0x54]
add eax, esi
add ecx, edx
push eax
mov edx, dword [ecx + 4]
and edx, 0x3fffffff
push edx
push dword [ecx]
mov dword [ebp - 0x48], edx
push dword [ecx + 8]
mov ecx, dword [ebp - 0x54]
push dword [ebp - 0x58]
call fcn.005121c0
mov esi, eax
test esi, esi
jne 0x512d23
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x34]
inc eax
mov edx, dword [ebp - 0x50]
add esi, dword [ebp - 0x48]
add edx, 0xc
cmp eax, dword [edi + 0x58]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x50], edx
jb 0x5129d3
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
push dword [edi + 0x54]
call fcn.00588148
mov dword [edi + 0x54], 0
add esp, 4
mov dword [edi + 0x58], 0
mov dword [edi + 0x5c], 0
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x512a68
push eax
call fcn.00588148
add esp, 4
mov dword [edi + 0x4c], 0
mov eax, dword [ebp - 0x60]
mov esi, eax
mov dword [edi + 0x50], 0
test ebx, ebx
je 0x512c9c
lea eax, [edi + 0x60]
mov dword [ebp - 0x3c], eax
mov edi, 0x101
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 2
cmp ebx, 0x26
jb 0x512cf1
push ebx
push esi
lea ecx, [ebp - 0x34]
call fcn.00512030
test eax, eax
jne 0x512cf1
cmp word [ebp - 0x34], di
jne 0x512cf1
mov al, byte [esi + 0x12]
mov byte [ebp - 0x2c], al
movzx edi, byte [esi + 0x13]
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x1c], eax
mov ax, word [esi + 0x1c]
mov word [ebp - 0x18], ax
lea eax, [edi + 0x26]
movzx ecx, word [esi + 0x24]
add eax, ecx
cmp ebx, eax
jb 0x512cf1
lea ebx, [ecx + 0x26]
push edi
lea eax, [ebx + esi]
push eax
lea ecx, [ebp - 0x28]
call fcn.00439460
add ebx, edi
test bl, 3
je 0x512b14
cmp byte [ebx + esi], 0
jne 0x512cf1
inc ebx
test bl, 3
jne 0x512b04
movzx eax, word [ebp - 0x32]
add eax, 0x10
cmp eax, ebx
jne 0x512cf1
xor eax, eax
cmp ebx, dword [ebp - 0x30]
cmovbe eax, ebx
test eax, eax
je 0x512cf1
mov ebx, dword [ebp - 0x30]
add esi, eax
sub ebx, eax
mov dword [ebp - 0x78], esi
mov al, byte [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
test al, 8
je 0x512b58
mov byte [ebp - 4], 1
push dword [ebp - 0x28]
call fcn.00588148
jmp 0x512c8e
test al, 4
je 0x512b6d
mov byte [ebp - 4], 1
push dword [ebp - 0x28]
call fcn.00588148
jmp 0x512c8e
mov dword [ebp - 0x6c], 0xffffffff
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x68]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
call fcn.00439460
mov edi, dword [ebp - 0x54]
xor eax, eax
mov ecx, dword [ebp - 0x64]
add ecx, dword [edi + 0x68]
mov dword [edi + 0x68], ecx
adc eax, dword [edi + 0x6c]
mov dword [edi + 0x6c], eax
cmp eax, 2
ja 0x512cb9
jb 0x512bbb
test ecx, ecx
jne 0x512cb9
mov ecx, dword [ebp - 0x3c]
mov esi, dword [edi + 0x1c]
call fcn.00439780
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 4]
lea eax, [ecx + 1]
mov dword [edx + 4], eax
mov eax, dword [edx]
mov dword [eax + ecx*4], esi
cmp dword [edi + 0x1c], 0x10000000
jae 0x512cb9
lea ecx, [edi + 0x18]
call fcn.00439780
push 0xc
call fcn.00587dd8
mov esi, eax
add esp, 4
mov dword [ebp - 0x7c], esi
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x64]
mov dword [esi], ecx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
test eax, eax
je 0x512c3a
push eax
call fcn.0058813f
add esp, 4
mov dword [esi + 4], eax
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push eax
call fcn.0058aed0
mov eax, dword [ebp - 0x64]
add esp, 0xc
mov dword [esi + 8], eax
push dword [ebp + 0x18]
mov byte [ebp - 4], 3
mov ecx, dword [edi + 0x1c]
lea eax, [ecx + 1]
mov dword [edi + 0x1c], eax
mov eax, dword [edi + 0x18]
mov dword [eax + ecx*4], esi
mov ecx, edi
mov al, byte [ebp - 0x2c]
shr al, 1
and al, 1
mov byte [ebp - 0x48], al
lea eax, [ebp - 0x20]
push dword [ebp - 0x48]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x58]
call fcn.005122c0
mov esi, eax
test esi, esi
jne 0x512cbe
push dword [ebp - 0x68]
call fcn.00588148
add esp, 4
mov byte [ebp - 4], 1
push dword [ebp - 0x28]
call fcn.00588148
mov esi, dword [ebp - 0x78]
add esp, 4
test ebx, ebx
jne 0x512a82
mov eax, dword [ebp - 0x60]
push eax
call fcn.00588148
add esp, 4
xor esi, esi
push dword [ebp - 0x74]
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
mov esi, 1
push dword [ebp - 0x68]
call fcn.00588148
add esp, 4
push dword [ebp - 0x28]
call fcn.00588148
add esp, 4
push dword [ebp - 0x60]
call fcn.00588148
add esp, 4
push dword [ebp - 0x74]
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
push dword [ebp - 0x28]
mov esi, 1
call fcn.00588148
add esp, 4
push dword [ebp - 0x60]
call fcn.00588148
add esp, 4
push dword [ebp - 0x74]
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
mov esi, 1
push dword [ebp - 0x60]
call fcn.00588148
add esp, 4
push dword [ebp - 0x74]
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
mov ecx, dword [ebx + 0x74]
mov eax, 0x40000000
mov edx, dword [edi + 0x58]
sub eax, ecx
cmp edx, eax
ja 0x512612
lea eax, [ecx + edx]
xor esi, esi
mov dword [ebx + 0x74], eax
xor edx, edx
sub esi, dword [ebx + 0x78]
mov eax, 2
mov ecx, dword [edi + 0x50]
mov edi, dword [ebx + 0x7c]
sbb eax, edi
cmp edx, eax
jb 0x512d7e
ja 0x512612
cmp ecx, esi
ja 0x512612
add dword [ebx + 0x78], ecx
adc edx, edi
xor esi, esi
mov dword [ebx + 0x7c], edx
push dword [ebp - 0x74]
call fcn.00588148
add esp, 4
mov eax, esi
jmp 0x512d9c
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00587d99
mov esp, ebp
pop ebp
ret 0x14
push 0x5f79a8
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x7e5
push eax
call fcn.0058acc1
int3