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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x180
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
push esi
mov esi, dword [eax]
sub edx, esi
mov dword [esp + 0x5c], esi
mov esi, dword [eax + 0xc]
mov eax, dword [ebx + 8]
sub eax, dword [ebx]
push edi
mov edi, dword [ebp + 0x10]
sub esi, ecx
mov dword [esp + 0x64], ecx
mov ecx, dword [edi]
mov edi, dword [edi + 8]
sub eax, edi
mov dword [esp + 0x18], edi
mov edi, dword [ebp + 0x10]
mov edi, dword [edi + 4]
and dword [esp + 0x10], 0
and dword [esp + 0xc], 0
and dword [esp + 0x30], 0
mov dword [esp + 0x14], edi
mov edi, dword [ebp + 0x10]
mov edi, dword [edi + 0xc]
mov dword [esp + 8], edi
mov edi, dword [esp + 0x18]
sub esi, dword [esp + 8]
sub edx, edi
sub edx, ecx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
sub esi, edx
mov dword [esp + 0x1c], esi
mov esi, dword [ebx + 0xc]
sub esi, dword [ebx + 4]
sub eax, ecx
sub esi, dword [esp + 8]
mov dword [esp + 0x58], eax
sub esi, edx
add eax, ecx
mov dword [esp + 0x28], esi
mov esi, dword [esp + 8]
mov dword [esp + 0x40], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x48], edi
lea eax, [esp + 0x78]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0xc]
mov esi, dword [esp + esi*4 + 0x24]
mov dword [esp + 0x14], esi
mov dword [esp + 0x3c], esi
lea edi, [eax - 0x10]
lea esi, [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x54], esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x5c], esi
mov edi, eax
lea esi, [esp + 0x50]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x4c], esi
lea edi, [eax + 0x10]
lea esi, [esp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
add dword [esp + 0x10], esi
inc dword [esp + 0xc]
add eax, 0x30
cmp dword [esp + 0xc], 3
jl 0x4752d5
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x58], edx
add edx, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov dword [esp + 8], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], ecx
lea edx, [esp + 0x108]
mov ecx, dword [esp + 8]
mov ecx, dword [esp + ecx*4 + 0x24]
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], ecx
lea edi, [edx - 0x10]
lea esi, [esp + 0x40]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], ecx
mov edi, edx
lea esi, [esp + 0x50]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], ecx
lea edi, [edx + 0x10]
lea esi, [esp + 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
add eax, ecx
inc dword [esp + 8]
add edx, 0x30
cmp dword [esp + 8], 3
movsd dword es:[edi], dword [esi]
jl 0x475386
push dword [ebp + 8]
call dword [fcn.004970ec]
mov ecx, dword [ebp + 0xc]
push dword [ecx + 4]
mov dword [esp + 0x10], eax
push eax
call dword [0x4970e4]
mov dword [esp + 0x18], eax
mov al, byte [ebp + 0x14]
mov byte [esp + 8], 0
mov byte [esp + 9], 0
mov byte [esp + 0xb], 1
mov byte [esp + 0xa], al
xor esi, esi
mov edx, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
lea eax, [esp + esi + 0xfc]
mov ecx, dword [eax - 4]
add ecx, edx
mov edx, dword [eax]
add edx, edi
mov edi, dword [ebx]
mov dword [eax], edx
mov dword [eax - 4], ecx
mov dword [esp + 0x1c], edx
lea eax, [esp + esi + 0x68]
mov edx, dword [eax]
add edx, edi
mov edi, dword [ebx + 4]
mov dword [eax], edx
lea eax, [esp + esi + 0x6c]
mov dword [esp + 0x20], edx
mov edx, dword [eax]
add edx, edi
mov dword [eax], edx
mov eax, dword [esp + esi + 0x70]
test eax, eax
jle 0x47549b
cmp dword [esp + esi + 0x74], 0
jle 0x47549b
cmp dword [esp + esi + 0x100], 0
jle 0x47549b
cmp dword [esp + esi + 0x104], 0
jle 0x47549b
push dword [esp + 8]
push dword [esp + esi + 0x78]
push eax
push edx
push dword [esp + 0x30]
push dword [esp + 0x20]
push dword [esp + esi + 0x11c]
push dword [esp + esi + 0x11c]
push dword [esp + 0x3c]
push ecx
push dword [ebp + 8]
call dword [0x49737c]
add esi, 0x10
cmp esi, 0x90
jl 0x47540c
push dword [esp + 0x18]
push dword [esp + 0x10]
call dword [0x4970e4]
cmp dword [esp + 0xc], 0
je 0x4754c9
push dword [esp + 0xc]
call dword [fcn.004970d0]
pop edi
pop esi
mov esp, ebp
pop ebp
ret