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

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x28]
cmp dword [ebp], 2
push esi
push edi
je 0x504a01
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebx + 0x27a0]
jne 0x5049f5
mov edx, dword [ebp + 4]
mov ecx, dword [ebx + 0x27a4]
mov dword [ecx + 0x18], edx
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 0x27a4]
mov dword [eax + 0x1c], ecx
mov edx, dword [ebp + 0x30]
mov eax, dword [ebx + 0x27a4]
mov dword [ebx + 0x159ec], edx
mov ecx, dword [eax + 0x1c]
add ecx, dword [eax + 0x18]
mov dword [ebx + 0x6ea0], ecx
mov edx, dword [ebp + 0x14]
add edx, ebp
mov dword [eax + 0x20], edx
mov eax, dword [ebp + 0x1c]
add eax, ebp
mov dword [ebx + 0x46cc], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 0x27a4]
add ecx, ebp
mov dword [ebx + 0x6e9c], ecx
mov ecx, dword [eax + 0x18]
lea edx, [ecx + ecx*2]
shl edx, 5
add edx, dword [eax + 0x20]
mov dword [eax + 0x24], edx
mov eax, dword [ebx + 0x6ea0]
imul eax, dword [ebx + 0x27a0]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebx + 0x6e9c]
add edx, ebp
test eax, eax
jbe 0x504aa1
mov edi, edi
mov esi, dword [ecx]
shl esi, 4
add esi, edx
mov dword [ecx], esi
add ecx, 8
sub eax, 1
jne 0x504a90
mov esi, dword [ebx + 0x159f0]
test esi, esi
mov eax, dword [ebx + 0x27a4]
mov ecx, dword [eax + 0x20]
jne 0x504b24
mov edx, dword [ebx + 0x159f4]
add edx, 4
cmp dword [eax + 0x18], esi
jle 0x504b8b
mov eax, dword [edx]
mov dword [ecx + 0x44], eax
fld dword [ecx + 0x30]
fld dword [ecx + 0x90]
add ecx, 0x60
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jp 0x504b11
fld dword [ecx - 0x2c]
fld dword [ecx + 0x34]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jp 0x504b11
fld dword [ecx - 0x28]
fld dword [ecx + 0x38]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jp 0x504b11
fld dword [ecx - 0x24]
fld dword [ecx + 0x3c]
fucompi st(1)
fstp st(0)
lahf
test ah, 0x44
jnp 0x504b14
add edx, 4
mov eax, dword [ebx + 0x27a4]
add esi, 1
cmp esi, dword [eax + 0x18]
jl 0x504ac6
jmp 0x504b8b
xor edx, edx
cmp dword [eax + 0x18], edx
jle 0x504b8b
movss xmm1, dword [0x6fa264]
movss xmm2, dword [0x6d54d4]
jmp 0x504b40
mov eax, dword [ecx + 0x50]
mov edi, dword [eax + esi + 0x10]
add eax, esi
mov dword [ecx + 0x44], edi
cmp dword [eax + 0x3c], 0x7d0
ja 0x5049f5
cmp dword [eax + 0x38], 0xf
ja 0x5049f5
movss xmm0, dword [eax + 8]
comiss xmm1, xmm0
ja 0x5049f5
comiss xmm0, xmm2
ja 0x5049f5
mov eax, dword [ebx + 0x27a4]
add edx, 1
add ecx, 0x60
cmp edx, dword [eax + 0x18]
jl 0x504b40
mov eax, dword [ebx + 0x27a4]
xor edx, edx
cmp dword [eax + 0x1c], edx
jle 0x504bc2
lea eax, [ecx + 0x44]
jmp 0x504ba0
mov ecx, dword [eax + 0xc]
mov esi, dword [0xa6fbe8]
lea ecx, [ecx + ecx*2]
mov ecx, dword [esi + ecx*8]
mov dword [eax], ecx
mov ecx, dword [ebx + 0x27a4]
add edx, 1
add eax, 0x60
cmp edx, dword [ecx + 0x1c]
jl 0x504ba0
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
lea esi, [ebx + 0x384]
lea edi, [ebx + 0x400]
add ebx, 0x47c
add eax, ebp
add ecx, ebp
add edx, ebp
mov dword [esp + 0x1c], 3
jmp 0x504bf0
mov ebp, dword [eax]
mov dword [esi], ebp
fld dword [ecx]
fstp dword [edi]
add esi, 0x20
fld dword [edx]
add edi, 0x20
fstp dword [ebx]
mov ebp, dword [eax + 4]
mov dword [esi - 0x1c], ebp
fld dword [ecx + 4]
fstp dword [edi - 0x1c]
add ebx, 0x20
fld dword [edx + 4]
add eax, 0x20
fstp dword [ebx - 0x1c]
mov ebp, dword [eax - 0x18]
mov dword [esi - 0x18], ebp
fld dword [ecx + 8]
fstp dword [edi - 0x18]
add ecx, 0x20
fld dword [edx + 8]
add edx, 0x20
sub dword [esp + 0x1c], 1
fstp dword [ebx - 0x18]
mov ebp, dword [eax - 0x14]
mov dword [esi - 0x14], ebp
fld dword [ecx - 0x14]
fstp dword [edi - 0x14]
fld dword [edx - 0x14]
fstp dword [ebx - 0x14]
mov ebp, dword [eax - 0x10]
mov dword [esi - 0x10], ebp
fld dword [ecx - 0x10]
fstp dword [edi - 0x10]
fld dword [edx - 0x10]
fstp dword [ebx - 0x10]
mov ebp, dword [eax - 0xc]
mov dword [esi - 0xc], ebp
fld dword [ecx - 0xc]
fstp dword [edi - 0xc]
fld dword [edx - 0xc]
fstp dword [ebx - 0xc]
mov ebp, dword [eax - 8]
mov dword [esi - 8], ebp
fld dword [ecx - 8]
fstp dword [edi - 8]
fld dword [edx - 8]
fstp dword [ebx - 8]
mov ebp, dword [eax - 4]
mov dword [esi - 4], ebp
fld dword [ecx - 4]
fstp dword [edi - 4]
fld dword [edx - 4]
fstp dword [ebx - 4]
jne 0x504bf0
mov dword [esp + 0x1c], 7
nop
mov ebp, dword [eax]
mov dword [esi], ebp
fld dword [ecx]
fstp dword [edi]
add esi, 4
fld dword [edx]
add edi, 4
fstp dword [ebx]
add ebx, 4
add eax, 4
add ecx, 4
add edx, 4
sub dword [esp + 0x1c], 1
jne 0x504ca0
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x2c]
movsx esi, word [eax + edx]
mov ecx, dword [0xa6f970]
add eax, edx
cmp esi, ecx
jne 0x5049f5
mov esi, dword [esp + 0x2c]
mov ebp, dword [0xa6f96c]
xor edi, edi
add eax, 2
cmp dword [esi + 0x5680], edi
mov dword [esp + 0x14], edi
jne 0x504d0b
cmp dword [esi + 0x567c], edi
mov dword [esp + 0x20], 1
jne 0x504d0f
mov dword [esp + 0x20], edi
cmp ecx, edi
jle 0x504e11
mov dword [esp + 0x18], edi
add ebp, 0x6c
mov dword [esp + 0x24], ecx
jmp 0x504d28
mov eax, dword [esp + 0x1c]
movsx ebx, word [eax]
add eax, 2
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov word [ebp + 0xa], bx
mov edx, dword [0xa6f96c]
mov ecx, dword [eax + edx + 0x78]
movzx eax, byte [ecx + 0x13]
add eax, 1
lea eax, [eax + eax*2]
shl eax, 4
add eax, ecx
xor edi, edi
cmp byte [ebp], 0
jbe 0x504d94
lea esi, [eax + 0x1c]
mov edi, edi
cmp dword [esp + 0x20], 0
je 0x504d7c
mov ecx, dword [esi]
mov edx, dword [esp + 0x2c]
push ecx
mov ecx, dword [edx + 0x567c]
call fcn.00423b80
mov byte [esi - 7], al
mov dword [esi], 0xffffffff
movzx eax, byte [ebp]
add edi, 1
add esi, 0x30
cmp edi, eax
jl 0x504d60
mov esi, dword [esp + 0x2c]
mov ecx, dword [0xa6f96c]
mov edx, dword [esp + 0x18]
mov edx, dword [edx + ecx + 0x78]
movzx eax, byte [edx + 0x13]
add eax, 1
lea ecx, [eax + eax*2]
shl ecx, 4
xor edi, edi
add ecx, edx
cmp ebx, edi
jl 0x504df4
mov eax, dword [esp + 0x1c]
cmp byte [eax], 0xff
je 0x504ded
movzx edx, byte [eax]
lea ebx, [edx + edx*2]
mov edx, dword [esp + 0x14]
shl ebx, 4
cmp edx, 0x30d40
mov dword [ebx + ecx + 0x1c], edx
jl 0x504ddd
mov dword [esp + 0x14], edi
movzx edx, byte [eax + 1]
add dword [esp + 0x14], edx
add eax, 2
cmp byte [eax], 0xff
jne 0x504dc0
add eax, 2
mov dword [esp + 0x1c], eax
add dword [esp + 0x18], 0x88
add ebp, 0x88
sub dword [esp + 0x24], 1
jne 0x504d24
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x20]
sub eax, dword [edx + 0x1c]
mov ecx, dword [esp + 0x34]
shr eax, 2
mov dword [esi + 0x159fc], eax
push ecx
mov eax, esi
mov dword [esi + 0x5680], 1
call fcn.005048d0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0xc