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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
push edi
call dword [sym.imp.MSVCP90.dll_public:_static_double___cdecl_std::numeric_limits_double_::quiet_NaN_void_]
fstp qword [esp + 0x20]
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov esi, dword [ebp + 8]
cmp dword [esi + 0x18], 1
mov ecx, 5
mov word [esp + 0x30], cx
jne 0x501453
mov eax, dword [esi]
mov edx, dword [esi + 0x14]
mov edi, dword [edx]
mov esi, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
test eax, eax
jne 0x50144f
call esi
xor eax, eax
cmp edi, dword [eax + 0x14]
jne 0x501433
call esi
push 5
push 4
add edi, 0x10
push edi
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
fld qword [esp + 0x38]
jmp 0x5017af
mov eax, dword [eax]
jmp 0x50142c
mov eax, dword [esi + 0x14]
mov ecx, dword [esi]
mov edi, dword [eax]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
test ecx, ecx
jne 0x5016ba
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor ecx, ecx
cmp edi, dword [ecx + 0x14]
jne 0x501485
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov eax, dword [edi + 0x20]
and eax, 0xc0
sete cl
test cl, cl
jne 0x5017b3
mov bl, byte [ebp + 0xc]
test bl, bl
jne 0x5014ad
cmp eax, 0x40
sete al
test al, al
jne 0x5017b3
lea ecx, [esp + 0x18]
call fcn.00501180
mov eax, dword [eax + 0x18]
and eax, 0xc0
sete cl
test cl, cl
jne 0x5017b3
test bl, bl
jne 0x5014db
cmp eax, 0x40
sete al
test al, al
jne 0x5017b3
fldz
lea ecx, [esp + 0x18]
fstp qword [esp + 0x20]
call fcn.00501180
add eax, 0x1c
push eax
lea ecx, [esp + 0x14]
call fcn.004eac30
add eax, 0x1c
push eax
call fcn.005011e0
add esp, 8
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call fcn.004eac30
mov ecx, dword [eax + 0x1c]
add eax, 0x1c
mov eax, dword [eax + 4]
push 5
mov dword [esp + 0x2c], ecx
push 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x34], eax
call fcn.004eac30
add eax, 8
push eax
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
fld qword [esp + 0x38]
lea ecx, [esp + 0x10]
fstp qword [esp + 0x58]
call fcn.004210f0
mov edi, dword [esp + 0x10]
mov ebx, dword [esi + 0x14]
mov eax, dword [esi]
test edi, edi
je 0x501563
cmp edi, eax
je 0x501569
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x5017b3
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
test edi, edi
jne 0x5016c1
call ebx
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x50158e
call ebx
mov eax, dword [esi + 0x20]
and eax, 0xc0
sete cl
test cl, cl
jne 0x501788
cmp byte [ebp + 0xc], cl
jne 0x5015b4
cmp eax, 0x40
sete al
test al, al
jne 0x501788
mov edx, dword [esp + 0x28]
fld qword [esp + 0x58]
mov ebx, dword [esp + 0x2c]
fstp qword [esp + 0x80]
mov dword [esp + 0x40], edx
test edi, edi
jne 0x5016c8
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp esi, dword [edi + 0x14]
jne 0x5015e4
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, dword [esi + 0x24]
mov eax, dword [esp + 0x10]
mov esi, dword [esi + 0x28]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], esi
test eax, eax
jne 0x5016cf
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
mov ecx, dword [esp + 0x14]
cmp ecx, dword [eax + 0x14]
jne 0x501615
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x14]
push 5
push 4
add edx, 0x10
push edx
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
fld qword [esp + 0x38]
mov eax, dword [esp + 0x40]
fst qword [esp + 0x58]
cmp ebx, esi
ja 0x5016e0
jb 0x50164a
cmp eax, edi
jae 0x5016d6
mov ecx, dword [esp + 0x18]
sub edi, eax
sbb esi, ebx
mov eax, esi
and eax, 0x80000000
and esi, 0x7fffffff
xor edx, edx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x90], edi
mov dword [esp + 0x94], esi
fild qword [esp + 0x90]
mov dword [esp + 0x48], edx
fild qword [esp + 0x48]
mov dword [esp + 0x78], ecx
mov ecx, eax
and eax, 0x7fffffff
fchs
and ecx, 0x80000000
faddp st(1)
mov dword [esp + 0x7c], eax
fild qword [esp + 0x78]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x68], edx
fild qword [esp + 0x68]
fchs
faddp st(1)
fdivp st(1)
jmp 0x50175d
mov ecx, dword [ecx]
jmp 0x50147a
mov eax, dword [edi]
jmp 0x501587
mov edi, dword [edi]
jmp 0x5015d9
mov eax, dword [eax]
jmp 0x501606
cmp ebx, esi
jb 0x50174d
ja 0x5016e0
cmp eax, edi
jbe 0x50174d
sub eax, edi
sbb ebx, esi
mov dword [esp + 0x88], eax
mov eax, ebx
and eax, 0x80000000
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x18]
and ebx, 0x7fffffff
xor edx, edx
mov dword [esp + 0x8c], ebx
fild qword [esp + 0x88]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x50], edx
fild qword [esp + 0x50]
mov ecx, eax
and eax, 0x7fffffff
and ecx, 0x80000000
fchs
mov dword [esp + 0x64], eax
faddp st(1)
mov dword [esp + 0x74], ecx
fild qword [esp + 0x60]
mov dword [esp + 0x70], edx
fild qword [esp + 0x70]
fchs
faddp st(1)
fdivp st(1)
jmp 0x50175d
fcom qword [esp + 0x80]
fnstsw ax
test ah, 0x44
jp 0x5017a7
fldz
fld qword [esp + 0x80]
mov esi, dword [esp + 0x14]
fld qword [0x579440]
mov edi, dword [esp + 0x10]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
fmul st(1), st(0)
fmulp st(3)
faddp st(2)
fmulp st(1)
fadd qword [esp + 0x20]
fstp qword [esp + 0x20]
test edi, edi
jne 0x5017a3
call ebx
cmp esi, dword [edi + 0x14]
jne 0x501795
call ebx
mov ecx, dword [esi]
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], ecx
jmp 0x501552
mov edi, dword [edi]
jmp 0x50178e
fstp st(0)
call dword [sym.imp.MSVCP90.dll_public:_static_double___cdecl_std::numeric_limits_double_::quiet_NaN_void_]
fstp qword [esp + 0x20]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
fld qword [esp + 0x20]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret